关于PHP5.3作废函数的处理方法
2012-07-02 19:31
471 查看
作废函数如下:
call_user_method()(使用
call_user_func() 替代)
call_user_method_array() (使用
call_user_func_array() 替代)
define_syslog_variables()
dl()
ereg() (使用
preg_match() 替代)
ereg_replace() (使用
preg_replace() 替代)
eregi() (使用
preg_match() 配合 ‘i’ 修正符替代)
eregi_replace() (使用
preg_replace() 配合 ‘i’ 修正符替代)
set_magic_quotes_runtime() 以及它的别名函数 magic_quotes_runtime()
[color=olive]session_register() (使用
$_SESSION 超全部变量替代)
session_unregister() (使用
$_SESSION 超全部变量替代)
session_is_registered() (使用
$_SESSION 超全部变量替代)
set_socket_blocking() (使用
stream_set_blocking() 替代)
split() (使用
preg_split() 替代)
spliti() (使用
preg_split() 配合 ‘i’ 修正符替代)
sql_regcase()
mysql_db_query() (使用
mysql_select_db() 和 mysql_query() 替代)
mysql_escape_string() (使用
mysql_real_escape_string() 替代)
废弃以字符串传递区域设置名称. 使用 LC_* 系列常量替代.
mktime() 的 is_dst 参数. 使用新的时区处理函数替代.
处理方法:editplus编辑器中,正则替换
替换ereg(),eregi():用preg_match替换
ereg\("([^"]+)"替换为:preg_match("/\1/"
ereg\('([^"]+)'替换为:preg_match('/\1/'
eregi\("([^"]+)"替换为:preg_match("/\1/i"
eregi\('([^"]+)'替换为:preg_match('/\1/i'
替换ereg_replace(),eregi_replace():用preg_replace()替换
ereg_replace\("([^"]+)"替换为:preg_replace("/\1/"
ereg_replace\('([^"]+)'替换为:preg_replace('/\1/'
ereg_ireplace\("([^"]+)"替换为:preg_replace("/\1/i"
ereg_ireplace\('([^"]+)'替换为:preg_replace('/\1/i'
如果 ereg_replace 的第一个参数不是正则表达式,可以用
str_replace 直接来替换
split用explode替换或preg_split替换
call_user_method()(使用
call_user_func() 替代)
call_user_method_array() (使用
call_user_func_array() 替代)
define_syslog_variables()
dl()
ereg() (使用
preg_match() 替代)
ereg_replace() (使用
preg_replace() 替代)
eregi() (使用
preg_match() 配合 ‘i’ 修正符替代)
eregi_replace() (使用
preg_replace() 配合 ‘i’ 修正符替代)
set_magic_quotes_runtime() 以及它的别名函数 magic_quotes_runtime()
[color=olive]session_register() (使用
$_SESSION 超全部变量替代)
session_unregister() (使用
$_SESSION 超全部变量替代)
session_is_registered() (使用
$_SESSION 超全部变量替代)
set_socket_blocking() (使用
stream_set_blocking() 替代)
split() (使用
preg_split() 替代)
spliti() (使用
preg_split() 配合 ‘i’ 修正符替代)
sql_regcase()
mysql_db_query() (使用
mysql_select_db() 和 mysql_query() 替代)
mysql_escape_string() (使用
mysql_real_escape_string() 替代)
废弃以字符串传递区域设置名称. 使用 LC_* 系列常量替代.
mktime() 的 is_dst 参数. 使用新的时区处理函数替代.
处理方法:editplus编辑器中,正则替换
替换ereg(),eregi():用preg_match替换
ereg\("([^"]+)"替换为:preg_match("/\1/"
ereg\('([^"]+)'替换为:preg_match('/\1/'
eregi\("([^"]+)"替换为:preg_match("/\1/i"
eregi\('([^"]+)'替换为:preg_match('/\1/i'
替换ereg_replace(),eregi_replace():用preg_replace()替换
ereg_replace\("([^"]+)"替换为:preg_replace("/\1/"
ereg_replace\('([^"]+)'替换为:preg_replace('/\1/'
ereg_ireplace\("([^"]+)"替换为:preg_replace("/\1/i"
ereg_ireplace\('([^"]+)'替换为:preg_replace('/\1/i'
如果 ereg_replace 的第一个参数不是正则表达式,可以用
str_replace 直接来替换
split用explode替换或preg_split替换
相关文章推荐
- 关于PHP5.3作废函数的处理方法
- 关于PHP5.3作废函数的处理方法
- 关于PHP5.3作废函数的处理方法
- 关于PHP5.3作废函数的处理方法
- 关于PHP的一些常用的字符串处理函数
- PHP date函数常用时间处理方法
- 关于php中header()、setcookie()、session_start()函数错误的解决方法和解释
- 关于php处理多选框checkbox的方法
- 解析关于java,php以及html的所有文件编码与乱码的处理方法汇总
- JSON(04)PHP的JSON处理函数及将MySQL结果集快速转为JSON的方法
- 关于PHP内置的字符串处理函数详解
- php脚本关于退出信号的处理 (注册信号函数) 实例
- 关于JQuery Moblie多选表单提交时PHP接收的处理方法
- php5.3 不支持 session_register() 此函数已启用的解决方法
- 深入php函数file_get_contents超时处理的方法详解
- 找不到php_mbstring.dll或php_exif.dll的解决方法与mb_系列函数的用法 libmcrypt.dll时出错的处理
- PHP date函数常用时间处理方法
- 关于php5.3的date()函数的报错
- 关于“未处理异常函数”调试方法