0
我從服務器收到以下錯誤:CKEditor的:致命錯誤:要求()[function.require]:未能開口要求 '__DIR __ /郎/ en.php')
Fatal error: require() [function.require]: Failed opening required '__DIR__/lang/en.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/38/8264638/html/console/assets/ckeditor/plugins/imageuploader/imgbrowser.php on line 16
在我的我的CKEditor整合imageuploader和工作在我的本地服務器,但它不是在託管server.its工作並稱imagebrowser.php文件中的錯誤以下是imagebrowser.php..please代碼幫助我..
<?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";
?>
更新PHP版本是不是真的簡單的任務:) 它需要大量的effofrt –
如何要求的(__ DIR__ '/lang/en.php');替換爲dirname(__ FILE__).. @ @黑暗的Absol(如何在我的代碼中實現) –
@AlexandrKapustin當然,但從長遠來看這是最好的解決方案。例如,如果我們可以說服每個人升級到PHP7,那麼我們不會再有人抱怨說'mysql_fetch_assoc'希望參數1是資源,布爾值給定。 –