Codeigniter 购物车类不能添加中文,下面一段代码限制了输入中文了,修改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 c...
在工作中遇到使用CI框架上传文件时,上传错误,提示:The filetype you are attempting to upload is not allowed.
可是我在配置数组中明明配置好了上传文件限制文件类型:$config['allowed_types'] = 'xls|xlsx';
print_r($_FILES)一看,其实是上传成功了的。
那到底是什么原因呢??
print_r($_FILES)会打印出mime。
看了下libraries/Upload.php,发现检测allowed_types时要对比上传文件的
mime,于是在c...
遇到打开本地环境XAMPP的MySQL时遇到的shutdown unexpectedly错误,那么该如何解决勒??
关于MySQL启用失败,出现了如下情况:
14:39:05 [mysql] Error: MySQL shutdown unexpectedly.
14:39:05 [mysql] This may be due to a blocked port, missing dependencies,
14:39:05 [mysql] improper privileges, a crash, or a shutdown by another method.
14:39:05 [mysql] Press the Logs button to view er...