2013-05-05 94 views
0

看来我的服务器上的东西已经改变了,我看到了夹杂在我的服务器上的每个网站失败的错误消息,下面是一个例子:的ini_set的include_path

Warning: require(xconstants_fa.php) [function.require]: failed to open stream: No such file or directory in /home/blahblah/public_html/fa/companies/ads/index.php on line 26 

而且在线路26,它说:

ini_set ("include_path", "../../includes/"); 
require "xconstants_fa.php"; 

所以很明显,不知我的服务器已经使用“的ini_set”功能(因为它只是工作之前罚款),我看着的php.ini disable_functions选项停止,无所不有,我评论所有禁用的功能,还有open_basedir,不在那里工作。

,如果我:

ini_set ("include_path", "../../includes/") or die('ERROR HERE'); 

它回声页

这里发生的ERROR HERE?我将不胜感激任何形式的帮助。

+0

同样的问题(由同一个用户),但在服务器故障这次接受的答案了:函数ini_set的include_path不工作( http://serverfault.com/q/505107/69499)。 – hakre 2014-10-26 15:13:08

回答

1

尝试使用实际功能来改变include_path中set_include_path()

$path = '../../includes/'; 
set_include_path(get_include_path() . PATH_SEPARATOR . $path); 
+0

这是一个CMS,我不想进入它的每一行并改变它们,我只是需要它像昨天一样工作:-) – behz4d 2013-05-05 08:08:39

1
<?php ini_set('include_path',ini_get('include_path').':../../includes/:'); ?>