inVINCEable Posted October 2, 2007 Share Posted October 2, 2007 I cannot seem to wrap my head around this peculiar problem. I have tried using both the function to set my include path, and then echo the get_included_files() and the files do not appear in the array. I can use require() or include() with no problems, but when I try to set the include path, the files do not seem to be included. Is there some weird quirck or gotcha to using this feature of PHP? I thought all you have to do is provide the directory and viola it should work. Any advice? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/71456-solved-files-not-being-included-with-set_include_path-or-ini_setinclude_path/ Share on other sites More sharing options...
inVINCEable Posted October 2, 2007 Author Share Posted October 2, 2007 Darn, nobody has any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/71456-solved-files-not-being-included-with-set_include_path-or-ini_setinclude_path/#findComment-360369 Share on other sites More sharing options...
trq Posted October 2, 2007 Share Posted October 2, 2007 Just because the files are in your path does not meen they are included automatically. It just meens instead of typing the full path, you can use just the filename. ie: <?php set_include_path(get_include_path(). ';' . '/foo/bar'); include 'file.php'; ?> Instead of.... <?php include '/foo/bar/file.php'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/71456-solved-files-not-being-included-with-set_include_path-or-ini_setinclude_path/#findComment-360413 Share on other sites More sharing options...
inVINCEable Posted October 2, 2007 Author Share Posted October 2, 2007 thorpe... thank you very much! I knew it was just something dumb I was doing wrong, in this case just the misunderstanding of the function. Thank you though you saved me a headache. Quote Link to comment https://forums.phpfreaks.com/topic/71456-solved-files-not-being-included-with-set_include_path-or-ini_setinclude_path/#findComment-360431 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.