ninedoors Posted April 1, 2008 Share Posted April 1, 2008 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 Quote Link to comment Share on other sites More sharing options...
p2grace Posted April 1, 2008 Share Posted April 1, 2008 Create a include file that does nothing but include the rest. Quote Link to comment Share on other sites More sharing options...
Xil3 Posted April 1, 2008 Share Posted April 1, 2008 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? Quote Link to comment Share on other sites More sharing options...
ninedoors Posted April 1, 2008 Author Share Posted April 1, 2008 I tried something liek thsi to test is but it failed. <?php include 'functions/'; $sheet ='Excel/MC_BRAND_FORECAST.xls'; $brand = 'M5'; readexcel($brand, $sheet); ?> Where functions folder holds my functions. What did I do wrong? Quote Link to comment Share on other sites More sharing options...
ninedoors Posted April 1, 2008 Author Share Posted April 1, 2008 Yep that makes sense Xil3. I'll try that. Nick Quote Link to comment Share on other sites More sharing options...
Xil3 Posted April 1, 2008 Share Posted April 1, 2008 Alright, lemme know if you have any other issues with it. Quote Link to comment Share on other sites More sharing options...
ninedoors Posted April 1, 2008 Author Share Posted April 1, 2008 Will do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.