摘要: js对数据进行json话后,直接post给php,但是php进行json_decode之后返回null,单引号什么都是正常的。最后,发现是转义的问题,所以: if (get_magic_quotes_gpc()){ $t = stripslashes($t); }文章来源:http://blog.xujif.com/archives/php-js-json-po... 阅读全文
posted @ 2013-05-23 19:06 xujif 阅读(374) 评论(0) 推荐(0) 编辑
摘要: php正则匹配有最长限制,在匹配长文本时有可能莫名其妙失败,解决方案:ini_set('pcre.backtrack_limit', -1);文章来源:http://blog.xujif.com/archives/php-preg_match-limit/ 阅读全文
posted @ 2013-05-23 19:04 xujif 阅读(499) 评论(0) 推荐(0) 编辑