【问题标题】:Change /home/opencart/public_html/opencart to localhost URL (Change Server URL to Localhost URL)将 /home/opencart/public_html/opencart 更改为 localhost URL(将服务器 URL 更改为 localhost URL)
【发布时间】:2018-12-04 07:14:01
【问题描述】:

我正在尝试将 Hosted Opencart 移至 XAMPP。 我已将域名更改为 localhost/opencart 但不知道如何将这些 URL 更改为 localhost URL

/home/opencart/public_html/opencart

我尝试在 google 中搜索,但没有找到任何解决方案。

【问题讨论】:

    标签: url server localhost opencart


    【解决方案1】:

    这取决于您要安装 OpenCart 的文件夹。 您需要找到目录的绝对路径。例如,如果您想在名为 opencart 的目录中安装 OpenCart,请在该文件夹中创建一个 find_path.php 文件,其中包含以下内容:

    <?php
    echo __DIR__;
    

    然后在浏览器中运行它:

    http://localhost/opencart/find_path.php
    

    您应该会在屏幕上看到类似这样的内容:

    C:\xampp\htdocs\opencart

    另一种方法是在你的localhost中安装一个全新的OpenCart,然后查看OpenCart填写的config.php文件。

    【讨论】:

    • windows机器中需要用\替换/吗?
    • 非常感谢朋友。
    • DIR_APPLICATION 的路径必须类似于“F:/xampp/htdocs/*******/catalog/”,您将文件夹名称放在星星的位置,并且config.php 中的其他定义相同
    猜你喜欢
    • 2023-01-19
    • 2020-10-12
    • 1970-01-01
    • 2017-07-19
    • 2020-06-21
    • 2017-01-16
    • 2016-12-26
    • 2021-02-22
    • 2013-06-30
    相关资源
    最近更新 更多