问题
I'm unsure of how to alter my php.ini file according to the instructions on the PEAR website
It says "In every case, PEAR's php_dir should be in the include path. If not, add it in your system's php.ini."
On my system(Mac 10.6.6), this is PEAR's php dir
/Users/michaelmitchell/pear/share/pear
On my system, this is the php.ini include path
.:/Applications/MAMP/bin/php5.3/lib/php
What should the resulting path look like in my php.ini? Do I delete the current path and replace it with PEAR's php dir path? or do I somehow integrate the two?
Thanks for your help. If you can please type out the whole path as it should be. I'm not very experienced ...
回答1:
As you may have already discovered, you need to set the PHP path configuration directive, 'include_path', in your system's php.ini file to:
include_path = ".:/Applications/MAMP/bin/php5.3/lib/php:/Users/michaelmitchell/pear/share/pear"
For a more detailed explanation of how to set the PHP path configuration directive, 'include_path', in your system's php.ini file, please see my answer to the question What does it mean to 'move' a file into include path list?
Hope this helps,
//. Elliot
回答2:
problem solved. Just separate the two paths with colon (on Linux) or semicolon on Windows
ch2.php.net/manual/en/ini.core.php#ini.include-path
来源:https://stackoverflow.com/questions/5831136/putting-pears-php-dir-into-include-path-in-php-ini