装ECShop2.7.3出现了一堆问题,主要是因为PHP版本过高引起的,不愿意降低版本,则只能一个个解决啦!这些问题包括:preg_replace、cls_image::gd_version、end(explode('.', $tmp))。一、关于preg_replace 因为使用PHP5.5.x,...
分类:
Web程序 时间:
2015-09-23 18:48:12
阅读次数:
158
ecshop在在PHP5.6.6版本以后,有了很多细微的变化。而ECSHOP官方更新又太慢,发现这些问题后也不及时升级,导致用户安装使用过程中错误百出。整理一下我遇到的问题希望对你们能有些帮组也为了自己以后查看。问题1: Deprecated: preg_replace(): The /e mo.....
分类:
Web程序 时间:
2015-09-22 16:40:30
阅读次数:
159
1、strip_tags(string,allow)2、转编码$getcontent = iconv('gb2312','utf-8',file_get_contents($url)); $getcontent = preg_replace( "@(.*?)@is", "", $getcontent...
分类:
Web程序 时间:
2015-09-19 18:05:25
阅读次数:
186
解决办法:将3个字节的特殊字符与emoji表情替换掉即可。$nickname = preg_replace('/xE0[x80-x9F][x80-xBF]'.'|xED[xA0-xBF][x80-xBF]/S','?', $nickname );$nickname = preg_replace('/...
分类:
微信 时间:
2015-09-15 19:59:49
阅读次数:
3742
//reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ?$some_string = preg_replace('/[x00-x08x10x0Bx0Cx0E-x19x7F...
分类:
Web程序 时间:
2015-09-15 14:19:59
阅读次数:
326
<?php $fp=fopen(‘ffff.txt‘,‘r‘); $str=fread($fp,filesize("ffff.txt")); fclose($fp); echo "替换前:\n".$str; $str=preg_replace(‘/^\s*$/m‘, ‘‘, $str); $str=preg_replace(‘/\n{2}/‘, "\n", $str); echo "替...
分类:
Web程序 时间:
2015-08-17 12:20:48
阅读次数:
244
<?php ???? $str=‘<bbvvvvvv>‘ ; ???? $patten=‘/<(?!ab)([a-z]{9,})>/‘? ;??? ? ???? $str=preg_replace($patten,"",$str); ???? echo $str; ???? echo "\n" ; ???? $patten=‘/<(...
分类:
Web程序 时间:
2015-08-16 13:58:32
阅读次数:
172
PHP – 正则表达式PHP – 正则表达式Table of Contents贪婪模式preg_filter ($arr_pat, $arr_rep, $arr_arr)preg_replace 字符串preg_replace 数组分组捕捉的例子prep_greppreg_matchpreg_mat...
分类:
Web程序 时间:
2015-08-08 09:04:47
阅读次数:
129
文件名路径中包含有中文的,如何获取文件名$str='中文/中文/匆匆那年.mp3';echo get_basename($str1);function get_basename($filename){ return preg_replace('/^.+[\\\\\\/]/', '', $fil...
分类:
Web程序 时间:
2015-08-07 10:57:52
阅读次数:
130
/** * 参数过滤 * @param string/array $str * @return string/array */function get_field($str){ if(empty($str)){return;} $string = preg_replace(...
分类:
其他好文 时间:
2015-07-15 18:25:42
阅读次数:
110