关于PHP5.3作废函数的处理方法
来源:互联网 发布:淘宝疯马皮哪家好 编辑:程序博客网 时间:2024/05/01 04:29
作废函数如下:
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作废函数的处理方法
- PHP中作废的函数,替换之~
- PHP 5.3常见作废函数的替换
- appserv关于include_path='.;C:\php5\pear'的错误处理
- PHP5字符串处理函数大全
- PHP5 字符串处理函数大全
- PHP5 字符串处理函数大全
- 关于ob_end_clean()函数在php5.4的疑问
- 关于PHP5的书籍
- PHP5的异常处理机制[3]--PHP5之前的错误处理之trigger_error()
- PHP5的异常处理机制[3]--PHP5之前的错误处理--返回Error flag(错误标记)
- PHP5 中魔术 方法 函数
- PHP5.3以上的date函数问题
- php5.3 已经弃用的函数
- php5.3 使用namespace后性能比较及类、函数、静态方法的性能比较
- php5.3废弃函数
- Leetcode 线性表 Remove Duplicates from Sorted List II
- 使用session监听+spring MVC拦截器禁止用户重复登录
- UIScrollView 基础属性方法
- SVM学习——软间隔优化
- 媒体与电商的数据变现价值还是有些区别的,媒体除了广告增值之外还有什么?
- 关于PHP5.3作废函数的处理方法
- 谷歌浏览器的一个新特点—关于获取iframe的parent对象
- 安装 qwt6
- 如何将Emmet安装到到 Sublime text 3?
- 在互联网公司大举进军移动支付和网络理财之际 平安推出壹钱包对战互联网“群狼”
- Unity3D调用Android接口
- 【Cocoa】cocoa UI 常用算法
- 微软谷歌面试100题之调整数组顺序使奇数位于偶数前面
- XMPP协议实现原理介绍