我从服务器收到以下错误:
致命错误:require()[function.require]:无法打开所需' __ DIR __ / lang / en.php' (include_path ='。:/ usr / local / php5 / lib / php')/home/content/38/8264638/html/console/assets/ckeditor/plugins/imageuploader/imgbrowser.php on line 16
在我的ckeditor中,我集成了imageuploader并在我的本地服务器中工作,但是它在托管服务器中无效。在imagebrowser.php文件中说错误是imagebrowser.php中的错误。请帮助我...
<?php
session_start();
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$root = "http://$_SERVER[HTTP_HOST]";
// checking lang value
if(isset($_COOKIE['sy_lang'])) {
$load_lang_code = $_COOKIE['sy_lang'];
} else {
$load_lang_code = "en";
}
// including lang files
switch ($load_lang_code) {
case "en":
require(__DIR__ . '/lang/en.php');
break;
case "pl":
require(__DIR__ . '/lang/pl.php');
break;
}
// Including the plugin config file, don't delete the following row!
require(__DIR__ . '/pluginconfig.php');
// Including the functions file, don't delete the following row!
require(__DIR__ . '/function.php');
// Including the check_permission file, don't delete the following row!
require(__DIR__ . '/check_permission.php');
$_SESSION["username"] = "disabled_pw";
?>
答案 0 :(得分:2)
您的PHP版本不支持__DIR__
,因此它被视为文字字符串。
您可以修复它,但您应该更新PHP版本。
dirname(__FILE__)