最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Codeigniter 购物车类不能添加中文解决方法
时间:2022-06-24 23:36:02 编辑:袖梨 来源:一聚教程网
修改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教程频道去查看。
相关文章
- ASP.NET中的Web控件介绍 09-17
- .Net设计模式之单例模式(Singleton) 09-17
- ASP.NET中使用用户控件 09-17
- Python:Vertex AI Model Registry 如何使用版本别名获取或部署指定模型版本? 09-17
- .NET设计模式之UML类图介绍 09-17
- ADO.NET基础知识详解 09-17