The eregi () function of PHP differs from ereg () in actual applications. The application method of the function eregi. In fact, the usage of the PHP function eregi () is basically the same as that of ereg. What we want to talk about today is the
Ereg ()Parsing of string alignment.Syntax: int Ereg (string pattern, string string, array [regs]);return value: Integer/arrayFunction type: Data processing
Content Description
This function parses string strings with the
After PHP is upgraded to php5.3, some programs often find the function eregi () is deprecated error message.Why?This is because the eregi () function is no longer supported in php5.3 and is replaced by the preg_match () function.The solution is to
After PHP upgrade to php5.3, in the process of use often found that some programs will appear function eregi () is deprecated error message.
What is the reason?This is because the eregi () function is no longer supported in php5.3 and is replaced
First of all, the difference between ereg () and eregi ():
Ereg () string contrast matching function, which distinguishes string capitalization;
Eregi () string contrast matching functions, which do not distinguish between string capitalization.
Php5.3x does not support ereg and eregi any more. The solution is for PHP programmers and websites. many PHP functions have been discarded before, mainly due to PHP version issues (PHP5.3.x). in order to better transition to PHP's future version
Today in the use of a regular prompt deprecated:function eregi () is the deprecated in error, and later queried for one reason is that we php5.3, in 5.3 has not supported eregi function, you can directly use Preg_ Match to replace.
Pre-change:
After PHP has been upgraded to php5.3, the procedure that is used frequently discovers that a function eregi () is deprecated error message.
What's the reason?This is because the eregi () function is no longer supported in php5.3, and the
php5.3 does not support eregi () function, how to convert with Preg_match? Ask the great God for advice!
function Inject_check ($sql _str) {
$check =eregi (' select|insert|update|delete|\ ' |\\*|\*|\.\.\/|\.\/|union|into|load_file|outfile ', $sql
Php5.3x no longer supports Ereg and Eregi, solutions
I am currently engaged in PHP programmers, Web site direction. The functions that have encountered PHP before have been deprecated, mainly the PHP version problem (php5.3.x), in order to better
Grammar int eregi(string pattern, string string, [array regs]);Definition and usageThe eregi () function searches a string for a specified pattern of strings. The search is case-insensitive. Eregi () can be particularly useful for checking
After PHP is upgraded to 5.3,ProgramThe error "function split () is deprecated" is returned.This is because of various reasons (mainly for the reason of regular expressions, see below for details). The split function is not supported in the new
Release date: 2012-03-30Updated on:
Affected Systems:PHP 5.4.0Description:--------------------------------------------------------------------------------PHP is an embedded HTML language. PHP is similar to Microsoft's ASP. It is a script language
Ereg ()Ereg_replace ()Eregi ()Eregi_replace ()Split ()(1) Ereg,eregiThis is a regular expression matching function, the former is case-insensitive, and the latter is irrelevant.Usage:Ereg (regular expression, string, [match part array name]);Regular
Get operating system
// Operating system
Public function getOS (){
$ Agent = $ _ SERVER ['http _ USER_AGENT '];
$ OS = false;
If (eregi ('win', $ agent) & strpos ($ agent, '95 '))
In php, HTTP_USER_AGENT is used to obtain user information, including the user's browser, operating system engineering, and whether the alex toolbar is installed. For more information, see.
1. When a user accesses the SERVER, use the PHP super
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.