2013-04-04 58 views
2

我在PHP和Zend Framework中遇到了这个小问题。包含路径被ZF覆盖

我使用apt-get install libzend-framework-php安装ZF,它也安装二进制zf.shzend-framework.ini/etc/php5/apache2/conf.d。我取消注释该文件中的行是:

[Zend] 
include_path=${include_path} ":/usr/share/php/libzend-framework-php" 

问题是这个覆盖完全是我的include_path。 Usualy,它包含/usr/share/php:/usr/share/pear

我的include_path现在只有:(从phpinfo()函数)

include_path :/usr/share/php/libzend-framework-php 

您可以在this link看到它。

我想知道什么是错的,因为它非常烦人!

+0

您是否尝试过将原来包括目录切换到了Zend-framework.ini线? – 2013-04-04 07:44:13

+0

是的,但我不想这样...我想能够逐一添加路径。很快,我将添加ZF2路径和ZendX_路径。 – 2013-04-04 21:33:18

回答

2

更改了Zend包括路径:

include_path=${include_path} ":/usr/share/php/libzend-framework-php:/usr/share/php:/usr/share/pear" 
+0

我会这样做的,但正如我在我上面的评论中所解释的,我希望能够通过添加'.ini'文件来添加路径...而不是多次编辑相同的文件... – 2013-04-05 03:34:38

+0

对不起, ,将你的php.ini改为:“include_path =”。/ usr/share/php/libzend-framework-php:/ usr/share/php:/ usr/share/pear“并从Zend配置中删除该行。 – 2013-04-11 10:54:28