Last active
          November 27, 2019 18:51 
        
      - 
      
- 
        Save DarkGhostHunter/6301bdb5524859d8e8aa8bdf815adfb2 to your computer and use it in GitHub Desktop. 
    Preload final file
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /** | |
| * Preloading @generated by Composer | |
| */ | |
| // Autoload the classes so those can be preloaded using `require_once`. | |
| require_once __DIR__.'/../autoload.php'; | |
| // File list | |
| $files = [ | |
| '/var/www/app/Foo.php', | |
| '/var/www/app/Bar.php', | |
| '/var/www/helpers/basic.php', | |
| '/var/www/helpers/advanced.php', | |
| '/var/www/vendor/Foo/Bar/src/Class.php', | |
| '/var/www/vendor/Foo/Bar/helpers/helpers.php', | |
| '/var/www/vendor/Foo/Bar/config.php', | |
| // ... | |
| ]; | |
| // Preload all root project files | |
| foreach ($files as $file) { | |
| require_once $file; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment