如果你使用的是localhost,那麼你可以試試這個。 或同一託管帳戶或的cPanel
進入目錄/控制器/通用/ header.php文件
之前 「公共功能指數(){」 添加該代碼
class ControllerCommonHeader extends Controller {
public function index() {
session_start();
$_SESSION['opencart'] = $this->session->data;
您必須打印陣列http://localhost/testphp
代碼:
<?php
session_start();
echo '<pre>';
print_r($_SESSION);
echo '</pre>';
?>
你的輸出就會
Array
(
[opencart] => Array
(
[language] => en-gb
[currency] => USD
[customer_id] => 2
[shipping_address] => Array
(
[address_id] => 2
[firstname] => Prashant
[lastname] => Bhagat
[company] =>
[address_1] => Surat
[address_2] =>
[postcode] => 395003
[city] => Surat
[zone_id] => 1485
[zone] => Gujarat
[zone_code] => GU
[country_id] => 99
[country] => India
[iso_code_2] => IN
[iso_code_3] => IND
[address_format] =>
[custom_field] =>
)
)
)
沒有在Opencart的數據庫中的'customer_online'表。請參閱admin \ model \ report \ customer.php中的'getCustomersOnline'函數 – DigitCart