-3

我希望在这里收到有关以下主题的一些信息:

调用这个函数:

protected function getAdminDirectory()
{
    return str_replace(HTTP_SERVER, '', HTTP_ADMIN);
}

以这个 php 语句结束:

PHP 注意:使用未定义的常量 HTTP_ADMIN - 在第 452 行的 /xx/xxx/xxx/www/catalog/controller/payment/mollie_ideal.php 中假定为“HTTP_ADMIN”

该语句似乎检索了管理目录,但该常量未定义,我不确定在哪里定义它,因为我的问题是我是否可以将其设为静态,因为该目录是已知的。

如果是这样,它会是什么样子?

{
    return str_replace(HTTP_SERVER, 'admin', admin);
}

使用 opencart 2.0.1.1 和 Mollie 版本 5.2.6 https://github.com/mollie/OpenCart/releases

提前谢谢你。

4

2 回答 2

0

您应该在 config.php 文件中添加一个管理目录指令。

定义('HTTP_ADMIN', ' http://xxxx.xx/admindirectory/ '); (通常只是管理员/)

于 2015-02-18T14:56:18.073 回答
0

对于其他有此问题的人:

 */
protected function getAdminDirectory()
{
    // if no default admin url defined in the config, use the default admin directory.
    if (!defined('HTTP_ADMIN'))
    {
        return 'admindirectory/';
    }

    return str_replace(HTTP_SERVER, '', HTTP_ADMIN);
}

在目录/控制器/付款/mollie_ideal.php

于 2015-02-19T15:33:04.247 回答