修改systemlibrariesCart.php,注释第186-190行产品名称的判断:
代码如下 | 复制代码 |
/*if ( ! preg_match("/^[".$this->product_name_rules."]+$/i", $items['name'])) { log_message('error', 'An invalid name was submitted as the product name: '.$items['name'].' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces'); return FALSE; } |
不过删除不是最好的办法,我们可以直接把正则匹配改成中文也可以就行了,这个我就不介绍了大家可到php教程频道去查看。