This article is a detailed analysis of
The code is as follows
Copy Code
var reg =/^[ u4e00-u9fa5]+$/; If (reg.test (str)) { alert (' work on Chinese characters '); } $action = Trim ($_get[' action ')); if
PHP while loop next
The number of times specified in the block of code that is being executed, or if the specified condition is true.
-------------------------------------------------- ------------------------------
PHP's LoopsMany times, when
The PHP switch syntax is used to perform actions based on different conditions.
-------------------------------------------------- ------------------------------
PHP for switch statementsUsing the switch statement to select one of the many
There was a problem at work today because our project data is so small that we need to borrow data from web search, and they only provide us with an XML interface. Therefore, we need to transform the XML data into HTML to present to everyone.
PHP Domain name forwarding program is I see from other places, through XML and PHP Exchange implementation, let's take a look at the source file.
1test.domain.comhttp://www.111cn.net/to>
index.php files.
/*Domain name pseudo jump schemeby
PHP section:Get the pull down linkage dataRequire ("conn.php");$result =mysql_query ("SELECT * from units left JOIN the users on (Users.unit=units.unid)");$mx =mysql_num_rows ($result);for ($i =0; $i $r =mysql_fetch_array ($result);$uname = $r ['
In Windows IIS 6.0, PHP is usually configured in CGI, ISAPI, and FastCGI. These three modes can be successfully run in IIS 6.0, the following describes the differences in configuration and performance of the three methods.1. CGI(Common Gateway
The following is the code for the implementation of scheduled tasks in pure PHP, which is popular on the internet. I have improved it, but don't rush to use it first. You must see the bottom. The code is as follows:Copy code Ignore_user_abort ();
When we want to numbers a large number of data, there is a limit on the number of digits, such as a five-digit license plate number, a ten-digit license number, order serial number, and a short URL, we can use the 36-digit system to calculate
I sorted out the common knowledge of some PHP classes to make it easier for new users to master the PHP classes, so that they can quickly understand the programs written by those elders, I hope you can add or correct the errors.Q: Can classes in PHP
In php. ini, the default value is date. timezone = UTC. Change to China time zone and date. timezone = PRC. If the GMT format is directly written, it is date. timezone = Etc/GMT + 8.You can also set it in the PHP page header. The code is as follows:
The program running result below is () The code is as follows:Copy code ? $ Numb = array (Array (10, 15, 30), array (10, 15, 30), array (10, 15, 30)); Echo count ($ numb, 1 );A.3B .12C.6D.9 Answer: BIf the mode in the count function is set to
This is because of PHP. Some settings in INI are incorrect. The most likely reason is that there are invalid DLL files. But why?I created an empty test. Php file under WIN32.Then execute c: php4php.exe test. php. At this time, my php. ini
$ Url = "http://www.111cn.net.net/welcome ";$ Parts = parse_url ($ url );Print_r ($ parts );/*Array([Scheme] => http[Host] => www.111cn.net.net[Path] =>/welcome/)In this way, we have a lot of space to get the content of each part of the url.As you
$ Date1 = "2007-10-25 ";$ Date2 = time ();Echo "$ date1 compare to $ date2 ";// 2007-10-25 compare to 1189772448$ Date1 = "2007-10-25 ";$ Date2 = date ("y-m-d", time ());Echo "$ date1 compare to $ date2 ";/*You don't know how big the difference
This article uses a large number of examples to explain the php Tutorial code for image operations. Next let's take a look at the example tutorials.$ Height = 300;$ Width = 300;// Create a background image$ Im = imagecreatetruecolor ($ width, $
The for statement is the most basic statement in the loop control part of PHP (also multiple languages). The execution rules and basic usage of the for statement are not described here, see the for statement section in the PHP Manual. The syntax of
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service