PHP require_once() all files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chathura86
    New Member
    • May 2007
    • 227

    PHP require_once() all files

    hi,

    i have a small question about including files

    i wonder if it makes a performance draw back if i included all
    the required files with a script there are about 100 files to be
    included and for every request only some of them will be needed

    so if i included all the files does it make any performance drawback

    im planning to use a script to read the lib folder and include all the
    php files in that folder

    Regards
    Chathura Bamunusinghe
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    Yep... I'd only include the files required...

    If the app is OO based, I'd look into using __autoload($cla ss_name) also.

    Regardless, you'll need to prepare your environment carefully and obviously make the include logic rock-solid.

    Comment

    • chathura86
      New Member
      • May 2007
      • 227

      #3
      Thanks for the info

      Regards
      Chathura Bamunusinghe

      Comment

      Working...