配置 Opencart 从测试到上线?

Configuring Opencart from testing to live?

我已经更改了根文件夹和/admin 文件夹的配置文件

<?php
// HTTP
    define('HTTP_SERVER', 'http://livesite.com/new/');

// HTTPS
    define('HTTPS_SERVER', 'http://livesite.com/new/');

// DIR
    define('DIR_APPLICATION', 'http://livesite.com/new/catalog/');
    define('DIR_SYSTEM', 'http://livesite.com/new/system/');
    define('DIR_IMAGE', 'http://livesite.com/new/image/');
    define('DIR_LANGUAGE', 'http://livesite.com/new/catalog/language/');
    define('DIR_TEMPLATE', 'http://livesite.com/new/catalog/view/theme/');
    define('DIR_CONFIG', 'http://livesite.com/new/system/config/');
    define('DIR_CACHE', 'http://livesite.com/new/system/storage/cache/');
    define('DIR_DOWNLOAD', 'http://livesite.com/new/system/storage/download/');
    define('DIR_LOGS', 'http://livesite.com/new/system/storage/logs/');
    define('DIR_MODIFICATION', 'http://livesite.com/new/system/storage/modification/');
    define('DIR_UPLOAD', 'http://livesite.com/new/system/storage/upload/');

// DB
    define('DB_DRIVER', 'mysqli');
    define('DB_HOSTNAME', 'localhost');
    define('DB_USERNAME', 'livesite');
    define('DB_PASSWORD', 'livesite');
    define('DB_DATABASE', 'livesite');
    define('DB_PORT', '3306');
    define('DB_PREFIX', 'livesite_');
?>

我正尝试将其托管在站点的子文件夹中 "New" 但是当我访问 livesite 时。com/new 迎接我的是空白屏幕

为您的配置文件使用绝对路径。如果您不知道您的绝对路径,请创建一个 PHP 文件(例如名为 path.php)并向其中添加以下代码。

<?php
$path = getcwd();
echo "This Is Your Absolute Path: ". $path . "<br>";
?>

然后在浏览器中导航到它 http://livesite.com/path.php

您的绝对路径应该类似于:/home/{prefix}/public_html/new,记住使用正斜杠而不是反斜杠。

出于安全原因,请在完成后删除该文件。