acid.waste Posted November 3, 2010 Share Posted November 3, 2010 I am trying to use the following code to include a directories contents and was wondering what im doing wrong, because its not working? if ($handle = opendir('../configs')) { while (false !== ($FILEZ = readdir($handle))) { include "$FILEZ"; } closedir($handle); } Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted November 3, 2010 Share Posted November 3, 2010 foreach (glob("../configs/*.php") as $filename) { include $filename; } Quote Link to comment Share on other sites More sharing options...
acid.waste Posted November 3, 2010 Author Share Posted November 3, 2010 foreach (glob("../configs/*.php") as $filename) { include $filename; } Thank you for replying and helping! 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.