php5.2升級5.3后不同地方
作者:佚名 時間:2012-02-05 分享到:
在使用php5.3建站時候碰到函數不同的地方如下
Deprecated(以后不再使用) functions:
call_user_method() 可以用 call_user_func() 替代
call_user_method_array() 可以用 call_user_func_array() 替代define_syslog_variables()
dl() 反對在使用DL加載擴展,php5.3 以后應用php.ini配制
ereg() 可以用 preg_match() 替代
ereg_replace() 可以用 preg_replace() 替代
eregi() 用 preg_match() i 參數替代
eregi_replace() 用 preg_replace() i 參數替代
set_magic_quotes_runtime() 用 magic_quotes_runtime() 替代
session_register() session_unregister() session_is_registered()
以上三個統一用
php5.2升級5.3后不同地方
作者:佚名 時間:2012-02-05 分享到:
在使用php5.3建站時候碰到函數不同的地方如下Deprecated(以后不再使用) functions:call_user..
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() 用 use mysql_real_escape_string() 替代
關于時區處理,統一用Timezone對象
Deprecated features:
直接返加new 實例不再建議使用. PHP 6 將不再支持
Call-time pass-by-reference 參數現在不再建議使用 PHP 6 將不再支持
用 {} 訪問字符串順序不再建議使用. 統一用 [] 代替. PHP 6 將不再支持
本文由聯楷提供