Opencart 页面意外停止并显示消息 "Use of undefined constant VERSION - assumed 'VERSION' "?
Opencart page stopped unexpectedly with a message "Use of undefined constant VERSION - assumed 'VERSION' "?
Warning: Use of undefined constant VERSION - assumed 'VERSION' (this will throw an Error in a future version of PHP) in /home/xxxxxxx/you-r.in/public_html/catalog/controller/extension/module/so_extra_slider.php on line 193
站点已停止工作并突然显示此消息警告。 php 和 Opencart 版本都没有更新。
代码如下所示:
// Check Version
if(version_compare(VERSION, '2.1.0.2', '>')) {
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price = false;
}
}
查看通常定义版本的 index.php
。例如
<?php
// Version
define('VERSION', '2.3.0.2.3');
您可以像这样添加版本定义
define('VERSION', 'your-version-number');
// Check Version
if(version_compare(VERSION, '2.1.0.2', '>')) {
Warning: Use of undefined constant VERSION - assumed 'VERSION' (this will throw an Error in a future version of PHP) in /home/xxxxxxx/you-r.in/public_html/catalog/controller/extension/module/so_extra_slider.php on line 193
站点已停止工作并突然显示此消息警告。 php 和 Opencart 版本都没有更新。 代码如下所示:
// Check Version
if(version_compare(VERSION, '2.1.0.2', '>')) {
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price = false;
}
}
查看通常定义版本的 index.php
。例如
<?php
// Version
define('VERSION', '2.3.0.2.3');
您可以像这样添加版本定义
define('VERSION', 'your-version-number');
// Check Version
if(version_compare(VERSION, '2.1.0.2', '>')) {