我正在尝试使用PEAR的Text_Password类,但不确定如何包含它。
我已经安装了PEAR。我猜它已经把类放在PHP目录的某个地方了。我的.htaccess文件中有这个
php_value include_path .:/Library/WebServer/Documents/phpweb20/include所以我猜它不是来接他们的。有人知道我怎么才能把PEAR类包括进来吗?
下面是错误messageI get:
Warning: include_once(Text/Password.php) [function.include-once]: failed to open stream: No such file or directory in /Library/WebServer/Documents/phpweb20/include/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Text/Password.php' for inclusion (include_path='.:/Library/WebServer/Documents/phpweb20/include') in /Library/WebServer/Documents/phpweb20/include/Zend/Loader.php on line 146
Fatal error: Class 'Text_Password' not found in /Library/WebServer/Documents/phpweb20/include/DatabaseObject/User.php on line 25我更改.htaccess文件的原因是因为我使用的是Zend框架。我将Zend类放在include文件夹中。我可以为PEAR做类似的事情吗?
非常感谢!
琼斯
发布于 2010-07-13 19:37:35
您可以设置多个文件夹,请参阅:http://php.net/manual/en/function.set-include-path.php
示例2可能最适合您的需求。你也可以在你的php ini文件中这样做。
https://stackoverflow.com/questions/3236646
复制相似问题