Is "include_path" meant to contain files that are automatically included?
I'm looking for a way to include a bunch of files so that they're accessible on all pages (functions, classes). I read about "include_path" configuration in php.ini and decided to test it by placing a dummy function inside my "includes" directory. However, when I try to call it, there's a fatal error that says: "Call to undefined function".
Am I using the "includes" directory properly? if yes, what did I do wro开发者_JAVA技巧ng?
No, include_path simply tells PHP in what directories to look when you do an include
or require
function call.
The include path is a directory that is searched to find included files. This allows you to put them somewhere different from the pages that get directly accessed.
精彩评论