php5.3不支持 ereg、ereg_replace等函数问题,如提示:Deprecated: Function ereg() is deprecated
在php5.3中,正则函数ereg_replace已经废弃,而dedecms还继续用。有两个方案可以解决以上问题:
1、把php版本换到v5.3下。
2、继续使用v5.3,修改php.ini文件
;extension=php_mbstring.dll
改为
extension=php_mbstring.dll
;mbstring.func_overload = 0
修改为:
mbstring.func_overload = 7
或者使用其他的函数:
define('DEDEADMIN', ereg_replace("[/\\]{1,}", '/', dirname(__FILE__) ) );
//改为
define('DEDEADMIN', preg_replace("/[\/\\\\]{1,}/", '/', dirname(__FILE__) ) );
注:因为preg_replace比ereg_replace的执行速度快,PHP推荐使用preg_replace.
php5.3不支持 ereg、ereg_replace等函数问题,如提示:Deprecated: Function ereg() is deprecated的更多相关文章
- php5.3 不支持 session_register() 此函数已启用的解决方法
php从5.2.x升级到5.3.2.出来问题了.有些原来能用的程序报错了,Deprecated: Function session_register() is deprecated php从5.2.x ...
- php5.3不支持 ereg、ereg_replace等函数问题
在php5.3环境下运行oscommerce,常常会出现Deprecated: Function ereg() is deprecated in...和Deprecated: Function ere ...
- php 升级到 5.3+ 后出现的一些错误,如 ereg(); ereg_replace(); 函数报错
在php5.3环境下运行,常常会出现 Deprecated: Function ereg() is deprecated in...和Deprecated: Function ereg_replace ...
- 出现Deprecated: Function ereg_replace() is deprecated in 的原因及解决方法
在 php5.3环境下运行oscommerce,常常会出现Deprecated: Function ereg() is deprecated in...和Deprecated: Function er ...
- Function ereg() is deprecated in
PHP 5.3 ereg() 无法正常使用,提示"Function ereg() is deprecated Error".问题根源是php中有两种正则表示方法,一个是posix, ...
- UTF-8、GB2312都支持的汉字截取函数
<?php/*Utf-8.gb2312都支持的汉字截取函数cut_str(字符串, 截取长度, 开始长度, 编码);编码默认为 utf-8开始长度默认为 0*/ function cut_str ...
- 在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)支持。
原文:在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)支持. WAMPServer可以让开发者在Windows系统下快速搭建WAMP环境,它支持多版本的Apach ...
- 【转】Deprecated: Function ereg_replace() is deprecated的解决方法
这个问题是因为你用的php版本过高. 在php5.3中,正则函数ereg_replace已经废弃,而dedecms还继续用.有两个方案可以解决以上问题: 1.把php版本换到v5.3下. 2.继续使用 ...
- php 版本升高后 会出现 之Deprecated: Function ereg_replace() is deprecated的解决方法
这个问题是因为php版本过高. 在php5.3中,正则函数ereg_replace已经废弃,而dedecms还继续用.有两个方案可以解决以上问题: 1.把php版本换到v5.3下. 2.继续使用v5. ...
随机推荐
- debian下软件包管理方式总结
linux最流行的包管理方式除了rpm之外就是debian的deb格式了.目前采用deb管理方式的主流操作系统主要有debian和ubuntu系列.和rpm包管理方式不同的是,虽然debian也有包含 ...
- 小白日记33:kali渗透测试之Web渗透-扫描工具-Burpsuite(一)
扫描工具-Burpsuite Burp Suite是Web应用程序测试的最佳工具之一,成为web安全工具中的瑞士军刀.其多种功能可以帮我们执行各种任务.请求的拦截和修改,扫描web应用程序漏洞,以暴力 ...
- linux上传下载
linux传下载 1.可以通过xftp连接服务器直接 拖拽 2.yum install lrzsz 通过rz/sz命令上传下载
- getComputedStyle和currentStyle
/*alert(div.style.width)*/ //null function getstyle(obj,name){ if(obj.currentStyle) { return obj.cur ...
- js获取网页高度(详细整理)
网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offset ...
- show/hide
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- PS基础学习 1---基本工具
1,选框工具: 选择以后对选框中的内容进行修改 ① Shift + 选框 为正方形 ② 选中后鼠标放在选框中对选择范围进行拖动 ③ 移动工具可以拉着选框中的内容移动 ④ ctrl+D取消选框 ⑤单行选 ...
- Java Concurrency - 浅析 CountDownLatch 的用法
The Java concurrency API provides a class that allows one or more threads to wait until a set of ope ...
- HttpClient(4.3.5) - Exception Handling
HttpClient can throw two types of exceptions: java.io.IOException in case of an I/O failure such as ...
- Spring(3.2.3) - Beans(4): p-namespace & c-namespace
p 命名空间 p 命名空间允许你使用 bean 元素的属性而不是 <property/>子元素来描述 Bean 实例的属性值.从 Spring2.0 开始,Spring 支持基于 XML ...