gpt4 book ai didi

php - Opencart 前端运行良好,但管理员返回空白页

转载 作者:搜寻专家 更新时间:2023-10-31 21:57:55 24 4
gpt4 key购买 nike

我对我的 opencart 网站感到困惑,因为我使用 MAMP 将我的网站从 ftp 服务器迁移到我的本地主机,我无法让它工作,因为/admin 只返回黑页。我检查了我的 PHP 日志: PHP log

[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice:  Undefined index:  in /Applications/MAMP/htdocs/uta/admin/index.php on line 151
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 152
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 156
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 157
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371

这是我的 admin/index.php: enter image description here

 $config->set('config_language_id', $languages[$code]['language_id']);
$config->set('config_admin_language', $languages[$code]['code']);
$config->set('config_language_default', $languages['fr']['language_id']);

// Language
$language = new Language($languages[$config->get('config_admin_language')] ['directory']);
$language->load($languages[$config->get('config_admin_language')]['filename']);
$registry->set('language', $language);

和 Translation.php: enter image description here

  private function loadFile($language_id, $filename)

{

$code = $this->languages[$language_id]['code'];

$file = $this->lang_root . $code . '/' . $filename . $this->file_ext;

if (file_exists($file)) {

$_lang = array();

include $file;

$this->translations[$filename][$language_id] = $_lang;

} else {

$this->translations[$filename][$language_id] = array();

}



}

虽然我很确定我的 2 config.php 配置正确,但如果配置不正确,php 日志会返回一些我认为的错误。

那么有没有人可以给我提示一下这个通知的意思?以及如何获得/admin 效果很好。提前谢谢你。

error_log(var_export($languages, true)) 显示:

array (
'en' =>
array (
'language_id' => '1',
'name' => 'English',
'code' => 'en',
'locale' => 'en_US.UTF-8,en_US,en-gb,english',
'image' => 'gb.png',
'directory' => 'english',
'filename' => 'startup',
'sort_order' => '1',
'status' => '1',
),
'fr' =>
array (
'language_id' => '2',
'name' => 'Français',
'code' => 'fr',
'locale' => 'fr_CA.UTF-8,fr_FR.UTF-8,fr_CA,fr_FR,fr-fr,french',
'image' => 'fr.png',
'directory' => 'french',
'filename' => 'startup',
'sort_order' => '0',
'status' => '1',
),
'ru' =>
array (
'language_id' => '3',
'name' => 'Russian',
'code' => 'ru',
'locale' => 'ru,ru_RU,ru_RU.UTF-8',
'image' => 'ru.png',
'directory' => 'russian',
'filename' => 'startup',
'sort_order' => '2',
'status' => '1',
),
)

error_log(var_export($this->languages, true)) 显示:

array (
1 =>
array (
'code' => 'en',
'name' => 'English',
'img' => 'gb.png',
'id' => '1',
),
2 =>
array (
'code' => 'fr',
'name' => 'Français',
'img' => 'fr.png',
'id' => '2',
),
3 =>
array (
'code' => 'ru',
'name' => 'Russian',
'img' => 'ru.png',
'id' => '3',
),
)

最佳答案

问题终于解决了,好像是cookie和session的问题。

关于php - Opencart 前端运行良好,但管理员返回空白页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31585331/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com