Database structure The code is as follows:Copy code -- PhpMyAdmin SQL Dump-- Version 2.11.2-rc1Http://www.111cn.net---- Host: localhost-- Generation date: November 09, 2010-- Server version: 5.0.41-- PHP version: 5.2.4SET SQL _MODE =
Deletes the specified element of an array. The code is as follows:Copy code $ A = array (0 => "Dog", 1 => "Cat", 2 => "Horse", 3 => "Bird ");Print_r (array_slice ($ a, 1, 2 ));?>OutputArray ([0] => Cat [1] => Horse) I think array_search () is
Because most of the check boxes exist at the same time, the name [] must be an array, so you only need to get one. The code is as follows:Copy code Html code 1 2PHP page code for processing forms:If (! Empty ($ _ POST ['Sport ']) {Echo ('Your
Example 1 The code is as follows:Copy code // Password verification$ Password = "zongzi_Abc_oo13a2 ";$ N = preg_match_all ("/^ [a-zA-Zd _] {8, }$/", $ password, $ array );// The length is 8 or moreVar_dump ($ array );?> Other rules are not used
For example The code is as follows:Copy code $ Filename = "Chinese file name .txt ";Header ('content-Type: application/octet-stream ');Header ('content-Disposition: attachment; filename = '. $ filename );Print "Hello! ";?> Save the program as a
Use trim series functions to delete left and right spaces The code is as follows:Copy code Trim removes spaces at both ends of a string,Rtrim removes the right space of a string,Ltrim removes the left space of a string.Echo trim ("space"). "
The code is as follows:Copy code $ Old_url = $ _ SERVER ["REQUEST_URI"]; // Check whether the link exists?$ Check = strpos ($ old_url ,'? '); // If yes?If ($ check! = False){ // If? No parameters, such as hindex. php?If (substr ($ old_url, $
Js versionRegular Expression Matching Chinese characters: [/u4e00-/u9fa5]Match double-byte characters (including Chinese characters): [^/x00-/xff] The code is as follows:Copy code Var reg =/^ [u4e00-u9fa5] + $ /;If (reg. test (str )){Alert
1. Disable notice error prompt1. Change error_reporting in the php. Ini file.Changed: The code is as follows:Copy code Error_reporting = E_ALL &~ E_NOTICE 2. If you cannot operate the php. Ini file, you can use the following method:Add the
I want to extract html images. The code is as follows:Copy code The above address. I want to extract all the addresses that contain 'ico 'and ignore them. For correction, some images are extracted. Some images are not extracted.Example: The
Database structure as longNo platform restrictionsYou only need to inform the id, parentid, and name.The following is the php code, which must be supported by the php environment. The code is as follows:Copy code /*** A common tree class can
I don't want to download the jquery file here. You can download it directly from google,You can define a call method on the page as follows: The code is as follows:Copy code Function getData (){$. GetJSON ("http: // 123.123.123.123 /? Callback =?
ForPhp array sortingMany functions are provided in php. I will list them below, which can be supplemented by incomplete functions.The sort () function is used to sort array units from low to high.The rsort () function is used to sort array units
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