Jump to content

PHP includes question


ninedoors

Recommended Posts

Hi,

 

I am wondering what the best way is to include all the files I need to run a program.  By the time I am done I will have probably 10 functions that I will be calling.  Is there a way to include all those files simply by including their folder?  Instead of have to include 10 files.  Is that possible, seems like it should be. Thanks

 

Nick

Link to comment
https://forums.phpfreaks.com/topic/98980-php-includes-question/
Share on other sites

Nope, but what you could do is have a separate file that holds all the includes and just include that one file instead of having to copy and paste all the 10+ includes in each file that requires it...

 

Here is an example:

 

Includefile.php

 

include "file1.php";
include "file2.php";
include "file3.php";

...

 

Does that make sense?

Link to comment
https://forums.phpfreaks.com/topic/98980-php-includes-question/#findComment-506465
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.