首頁 美術繪圖 | 美術設計 | 熱門標籤 | 首選 | 首頁宣傳 | 近期作品 論壇: 發表 | 美術工作 | 美術比賽 | 展覽活動 | 美術相關 | 一般討論 | 美術同好 CG 討論 :: Photoshop | Painter | 3D 行動 | AMP

【 立即註冊 】 : 更改個人資料 : : 登入

會員名稱: 登入密碼: 保持登入

升級 php 5.2.x 至 php 5.3.x

發表新主題 回覆主題 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體

| 1頁, 共1
人氣點閱:6327 發表人
升級 php 5.2.x 至 php 5.3.x 2010-05-15 21:03
/ / /

改的不少: http://tw.php.net/migration53

PHP 5.2 --> PHP 5.3 廢除的 PHP.ini 選項


下列這些 INI 選項會在啟用時出現 E_DEPRECATED 例外

* define_syslog_variables
* register_globals
* register_long_arrays
* safe_mode
* magic_quotes_gpc
* magic_quotes_runtime
* magic_quotes_sybase
* 註解不能用 '#' Comments starting with '#' are now deprecated in .INI files.


PHP 5.2 --> PHP 5.3 廢除 Functions 函式


- 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() with the 'i' modifier 取代)
- eregi_replace() (可使用 preg_replace() with the 'i' modifier 取代)
- set_magic_quotes_runtime() / magic_quotes_runtime()
- session_register() (可使用 the $_SESSION superglobal 取代)
- session_unregister() (可使用 the $_SESSION superglobal 取代)
- session_is_registered() (可使用 the $_SESSION superglobal 取代)
- set_socket_blocking() (可使用 stream_set_blocking() 取代)
- split() (可使用 preg_split() 取代) 如果沒用到 Regexp 的 Split 可以用 explode 取代
- spliti() (可使用 preg_split() with the 'i' modifier 取代) 如果沒用到 Regexp 的 Split 可以用 explode 取代
- sql_regcase()
- mysql_db_query() (可使用 mysql_select_db() and mysql_query() 取代)
- mysql_escape_string() (可使用 mysql_real_escape_string() 取代)

- Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.
- The is_dst parameter to mktime(). Use the new timezone handling functions instead.


PHP 5.2 --> PHP 5.3 廢除的一般語法



* Assigning the return value of new() by reference is now deprecated.

* Call-time pass-by-reference is now deprecated.

* The use of {} to access string offsets is deprecated. Use [] instead

PHP 5.2 --> PHP 5.3 Windows 平台注意事項


1. PHP 5.3 已經不支援 386 or 486 的老舊平台,至少要 586+
2. PHP 5.3 已經不支援 Windows 2000 或 Windows NT/ME/98
3. PHP 5.3 有提供 VC9 (Visual Studio 2008) 編譯的版本
________________

美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
Type



繪圖畫廊設計藝廊
攝影相簿留言板
最愛收藏分類標籤
暱稱: Type
註冊: 2002-11-30
發表: 11072
來自: vovo2000.com
V幣: 900702
Re: 升級 php 5.2.x 至 php 5.3.x 2010-07-24 14:20
/ / /

Using GNU grep


代碼:

grep -r --include="*\.php*" call_user_method .
grep -r --include="*\.php*" call_user_method_array .
grep -r --include="*\.php*" define_syslog_variables .
grep -r --include="*\.php*" "dl(" .
grep -r --include="*\.php*" ereg .
grep -r --include="*\.php*" ereg_replace .
grep -r --include="*\.php*" eregi .
grep -r --include="*\.php*" eregi_replace .
grep -r --include="*\.php*" set_magic_quotes_runtime .
grep -r --include="*\.php*" session_register .
grep -r --include="*\.php*" session_unregister .
grep -r --include="*\.php*" session_is_registered .
grep -r --include="*\.php*" set_socket_blocking .
grep -r --include="*\.php*" split .
grep -r --include="*\.php*" spliti .
grep -r --include="*\.php*" sql_regcase .
grep -r --include="*\.php*" mysql_db_query .
grep -r --include="*\.php*" mysql_escape_string .


Using Microsoft qgrep


代碼:

echo "" > z.txt
qgrep call_user_method *.php >> z.txt
qgrep call_user_method_array *.php >> z.txt
qgrep define_syslog_variables *.php >> z.txt
qgrep "dl(" *.php >> z.txt
qgrep ereg *.php >> z.txt
qgrep ereg_replace *.php >> z.txt
qgrep eregi *.php >> z.txt
qgrep eregi_replace *.php >> z.txt
qgrep set_magic_quotes_runtime *.php >> z.txt
qgrep session_register *.php >> z.txt
qgrep session_unregister *.php >> z.txt
qgrep session_is_registered *.php >> z.txt
qgrep set_socket_blocking *.php >> z.txt
qgrep split *.php >> z.txt
qgrep spliti *.php >> z.txt
qgrep sql_regcase *.php >> z.txt
qgrep mysql_db_query *.php >> z.txt
qgrep mysql_escape_string *.php >> z.txt


代碼:

<?php
if(ereg('^lang_',$test_string)) // no slash

if(preg_match('/^lang_/',$test_string)) // SLASH
?>

________________

美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
Type



繪圖畫廊設計藝廊
攝影相簿留言板
最愛收藏分類標籤
暱稱: Type
註冊: 2002-11-30
發表: 11072
來自: vovo2000.com
V幣: 900702





資訊相關理論、技術、管理、應用、產品等
發表新主題 回覆主題