Function ereg () isdeprecatedError in php5.3
PHP 5.3 ereg () cannot be used normally. the prompt "Function ereg () is deprecated Error" is displayed ". The root cause is that there are two regular expression methods in php, one is posix and the other is perl. php6 intends to abolish the regular expression method of posix, so a preg_match is added later. The solution to this problem is simple. add a filter prompt symbol before ereg to convert ereg () to @ ereg (). In this way, the prompt information is blocked, but the root problem is still not solved. php uses ereg normally before version 5.2. after version 5.3, preg_match should be used to replace ereg. Therefore, you need to change it to the following: ereg ("^ [0-9] * $", $ page: preg_match ("/^ [0-9] * $/", $ page) Special note: The obvious difference between posix and perl is whether to add a slash. Therefore, compared with ereg, the latter adds two "/" symbols before and after the regular expression, which cannot be missing. Tips: This problem does not occur in php5.2 or earlier versions.
The above is the Function ereg () is deprecated Error solution that appears at php5.3. For more information, see The PHP Chinese website (www.php1.cn )!