Guest convention Posted December 25, 2006 Share Posted December 25, 2006 Hello,I am wondering if it is possible to use the include() function to include a whole directory and have all of the files in that directory be included?Thank you! Link to comment https://forums.phpfreaks.com/topic/31797-solved-possible-to-use-include-for-a-whole-directory/ Share on other sites More sharing options...
kenrbnsn Posted December 25, 2006 Share Posted December 25, 2006 No, the include() and related functions just work on files. You can write a loop using the glob() function to get each file in a directory and include it.Ken Link to comment https://forums.phpfreaks.com/topic/31797-solved-possible-to-use-include-for-a-whole-directory/#findComment-147453 Share on other sites More sharing options...
Guest convention Posted December 25, 2006 Share Posted December 25, 2006 [quote author=kenrbnsn link=topic=119855.msg491237#msg491237 date=1167019463]No, the include() and related functions just work on files. You can write a loop using the glob() function to get each file in a directory and include it.[/quote]Yeah, I thought I'd have to use some kind of loop to acheive this. Thank you for the help! :) Link to comment https://forums.phpfreaks.com/topic/31797-solved-possible-to-use-include-for-a-whole-directory/#findComment-147456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.