dsafew1231 2015-02-18 09:06
浏览 20
已采纳

OpenCart和支付模块mollie - 返回str_replace

I hope to receive some information here on the following subject:

calling this function:

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

ends in this php statement:

PHP Notice: Use of undefined constant HTTP_ADMIN - assumed 'HTTP_ADMIN' in /xx/xxx/xxx/www/catalog/controller/payment/mollie_ideal.php on line 452

This statements seems to retrieve the admin directory but the constant is undefined, I'm uncertain on where to define it there for my question would be if I could make this static since the directory is known.

If so how would it look like?

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

Using opencart 2.0.1.1 and Mollie version 5.2.6 https://github.com/mollie/OpenCart/releases

Thank you in advanced.

  • 写回答

2条回答 默认 最新

  • donglun2024 2015-02-19 15:33
    关注

    For anyone else having this problem:

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

    in catalog/controller/payment/mollie_ideal.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 javaweb登陆的网页为什么不能正确连接查询数据库
  • ¥15 数学建模数学建模需要
  • ¥15 已知许多点位,想通过高斯分布来随机选择固定数量的点位怎么改
  • ¥20 nao机器人语音识别问题
  • ¥15 怎么生成确定数目的泊松点过程
  • ¥15 layui数据表格多次重载的数据覆盖问题
  • ¥15 python点云生成mesh精度不够怎么办
  • ¥15 QT C++ 鼠标键盘通信
  • ¥15 改进Yolov8时添加的注意力模块在task.py里检测不到
  • ¥50 高维数据处理方法求指导