For pear Class Call problems, use the default installation path of the class installed by pear. during the call, we find that require_once ('XX') and 'XX' in each class do not exist in the specified directory, that is, the paths are inconsistent. in this way, an error is reported when this class is called. why? Is it necessary to modify the call class path in the source code of the installed class? Or other reasons?
Reply to discussion (solution)
When the include_path is not set in php. ini, the pear installation directory is included in the include_path
If you specify include_path and use pear, you should append the pear installation directory to include_path.
Then you can call the full path, such as require ("d: \ x \ xx \ 1.php ");
You can also see the results of echo dirname (_ file,
You can also use get_include_path to check which paths are currently included.
I understand that the 'XX' in require_once ('XX') in those classes is relative to php. this is the relative path of require_path set in ini. I have understood it incorrectly and thought that require_once is the relative path relative to the current directory. thank you for your reminder.
What you understand is not wrong!
The relative path of the embedded file is searched by the directory specified by include_path.