首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当更改了.htaccess中的包含路径时,如何在MAC上包含PEAR php包

问当更改了.htaccess中的包含路径时,如何在MAC上包含PEAR php包
EN

Stack Overflow用户
提问于 2010-07-13 19:24:57
回答 1查看 744关注 0票数 0

我正在尝试使用PEAR的Text_Password类,但不确定如何包含它。

我已经安装了PEAR。我猜它已经把类放在PHP目录的某个地方了。我的.htaccess文件中有这个

代码语言:javascript
复制
php_value include_path .:/Library/WebServer/Documents/phpweb20/include

所以我猜它不是来接他们的。有人知道我怎么才能把PEAR类包括进来吗?

下面是错误messageI get:

代码语言:javascript
复制
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做类似的事情吗?

非常感谢!

琼斯

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-07-13 19:37:35

您可以设置多个文件夹,请参阅:http://php.net/manual/en/function.set-include-path.php

示例2可能最适合您的需求。你也可以在你的php ini文件中这样做。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3236646

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档