F@rum_Haiquan.info (*_*)
Fix lỗi "Assigning the return value of new by reference is deprecated" tại PHP 5.3 - Bản rút gọn

+- F@rum_Haiquan.info (*_*) (http://haiquan.info/F@rum)
+-- Diễn đàn: TIN HỌC- CÔNG NGHỆ (http://haiquan.info/F@rum/forumdisplay.php?fid=101)
+--- Diễn đàn: THIẾT KẾ WEB-LẬP TRÌNH (http://haiquan.info/F@rum/forumdisplay.php?fid=108)
+--- Chủ đề: Fix lỗi "Assigning the return value of new by reference is deprecated" tại PHP 5.3 (/showthread.php?tid=1422)



Fix lỗi "Assigning the return value of new by reference is deprecated" tại PHP 5.3 - ngocvu1403 - 10-07-2013

Bạn gặp những lỗi như thế này:
Deprecated: Assigning the return value of new by reference is deprecated in /home/powernet.vn/public_html/index.php on line 8
Deprecated: Assigning the return value of new by reference is deprecated in /home/powernet.vn/public_html/includes/dbconnect.php on line 4

Cách xử lý như sau, bạn hãy mở file lỗi ra, tìm đến dòng nó báo warning, ở đây là:

Trích dẫn:- index.php on line 8
- dbconnect.php on line 4

tìm dòng có cấu trúc như (thủ thuật: hãy tìm những dòng có ký tự "&"):
Code:

Trích dẫn:$tên_biến = & new abc;


Bạn bỏ kí tự "&" đi là hết lỗi thôi.
Chúc bạn thành công