Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php OpenCart和支付模块mollie-退货stru_替换_Php_Str Replace_Opencart2.x - Fatal编程技术网

Php OpenCart和支付模块mollie-退货stru_替换

Php OpenCart和支付模块mollie-退货stru_替换,php,str-replace,opencart2.x,Php,Str Replace,Opencart2.x,我希望在此收到有关以下主题的一些信息: 调用此函数: protected function getAdminDirectory() { return str_replace(HTTP_SERVER, '', HTTP_ADMIN); } 结束于以下php语句: PHP注意:在第452行的/xx/xxx/xxx/www/catalog/controller/payment/mollie_ideal.PHP中使用未定义的常量HTTP_ADMIN-假定为“HTTP_ADMIN” 这个语句似乎

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

调用此函数:

protected function getAdminDirectory()
{
    return str_replace(HTTP_SERVER, '', HTTP_ADMIN);
}
结束于以下php语句:

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

这个语句似乎检索admin目录,但常量未定义,我不确定在哪里定义它,因为我的问题是,既然目录已知,我是否可以将其设置为静态

如果是这样的话,它会是什么样子

{
    return str_replace(HTTP_SERVER, 'admin', admin);
}
使用opencart 2.0.1.1和Mollie版本5.2.6


高级版谢谢。

您应该在config.php文件中添加一个admin directory指令


定义“HTTP_ADMIN”;对于其他有此问题的人,通常只需管理员/

 */
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);
}

在catalog/controller/payment/mollie_-ideal.php中,在配置文件中定义了admin,似乎已经完成了这个任务。OpenCart中没有HTTP_-admin这样的常量。我甚至没有遵循我们试图实现的目标。这不是我试图实现的目标,这是一个为OpenCart编程的外部模块和我正在使用的版本试图实现的目标,如果您再次阅读,这是我的全部问题…因为它没有准确定义!但是,我已经将HTTP_ADMIN直接设置为管理目录,如果您看到上面的无用注释,那么它已经解决了;。谢谢,谢谢你的回答。