2013-05-05 29 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/:'); ?>