Some errors that occur after php is upgraded to 5.3 +, such as ereg (); ereg_replace (); function errors run in the php5.3 environment, which often result in & nbsp; Deprecated: Functionereg () isdeprecatedin... and Deprecated: Functionereg_replace () some errors that occur after isdeprecatedi php is upgraded to 5.3 +, such as ereg (); ereg_replace (); function error
Run in the php5.3 environment, usually
Deprecated: Function ereg () is deprecated in... and Deprecated: Function ereg_replace () is deprecated in... error messages for these types.
The reason is that php5.3 and later versions do not support the ereg () function, but use the preg_match () function. they do not support the ereg_replace () function, but use the preg_replace () function.
Solution: change unsupported functions to supported functions.
For example
If (eregi ('^ ('value', $ value)
Changed:
If (preg_match ('/value/', $ value)
For example:
$ String = ereg_replace ('value', '', trim ($ string ));
Changed:
$ String = preg_replace ('{value}', '', trim ($ string ));
Solution Deprecated: Assigning the return value of new by reference is deprecated in error
Because php is 5.3, "=" can be directly used in php5.3 ", in the previous tests, the php environment below 5.3 used the "= &" symbol.
The "= &" symbol cannot be used in programs after version 5.3. If the Deprecated: Assigning the return value of new by reference is deprecated in error occurs on your website, do not worry. first locate the file with the error, find whether the program uses the "= &" symbol, and find that the "= &" symbol is used. after removing the "&" symbol, the program runs normally.
Problem: Deprecated: Function set_magic_quotes_runtime () is deprecated in
The cause is that this feature (set_magic_quotes_runtime () has been disabled after PHP5.3.
This feature has been completely removed from PHP6.
You can comment out or delete the wrong row, or add the @ symbol before set_magic_quotes_runtime ().