The following is an article on basic document reading and writing operations, I used to read this article after the basic operation of the document, issued to share with everyone: copy content to the Clipboard
The code is as follows
[Ajax Introduction] Ajax is a Web application development method that uses client script to exchange data with a Web server. Web pages can be updated dynamically without interrupting the interactive process. With Ajax, users can create a direct,
In the previous tutorial you may have read XML parsing using PHP (in the middle, the full XML parser takes the first class, which takes tons of line code and extra time.) In PHP5, we can use simple XML classes to parse XML quickly in only two lines
086-area code-number-Ext^086-[1-9][0-9]{1,4}-[1-9][0-9]{4,7}-[0-9]{3,4}$
2G's cell phone number is almost all 13.
The code is as follows
Copy Code
$mobilephone =trim ($_post["Smmobilephone"]);Regular verification of
12. 3 The generation of automatic miniature graphsBecause of the large amount of data in the picture, the transfer process is relatively long, so when users browse the picture, often want to firstDisplays a thumbnail of a picture.Although you can
Isset-detect whether the variable is setThe PHP isset () is used to detect whether one or more variables are set and returns TRUE if the detected variable exists, or FALSE.
Example:
The code is as follows
Copy Code
$var
JSON (JavaScript Object notation) is a lightweight data interchange format. Easy for people to read and write, but also easy to machine parsing and generation. JSON plays a very good role in the process of background interaction in the front. Please
$fruits =array (
"D" => "Lemon",
"A" => "orange",
"B" => "banana",
"C" => "Apple"); Define an array
Arsort ($fruits); Reverse-Sort the array
foreach ($fruits as $key => $val)//Cyclic output the key value pairs of the array after sorting
Now I'm going to show you how many users are browsing your site. There are many ways to show it, but I try to keep it simple and clean.
First, we must create two tables for your database tutorial.
CREATE TABLE ' Uonline ' (' Session ' varchar (m)
I'll explain all the magic methods in PHP below. In fact, most of the following methods, for a qualified PHP programmer, are very familiar with things. I am here to make a summary, I make a record of learning, but also not familiar with these
about what is ImageMagick
ImageMagick is a series of software, mainly for image creation, editing and conversion, etc.
Centos installation ImageMagick
1. Run the following command sequentially
The code is as follows
Copy Code
Modify theme comments-ajax.php filesIn the comments-ajax.php file under the topic directory, around 60 rows (fields such as $ _ POST ['author'] in the user submitted comment form were just obtained ). Then add the following code to the file:
Recently, it was found that the access to your blog website was slow and sometimes failed to respond;The server traces the access logs and submits a large number of requests to xmlrpc. php. The IP address remains unchanged.You can use this
Recently, when collecting the lyrics of Codoy music, we found that the lyrics of Codoy music are all "garbled" and the lyrics we usually see are all in lrc format, this kind of krc format for Codoy is obviously specially handled. It is usually
Sys_get_temp_dir("= 5.2.1" in PHP 5)Sys_get_temp_dir-the returned directory path is used for temporary files.DescriptionString sys_get_temp_dir (invalid)The PHP store temporary files in the returned directory path are used by default.Return valueThe
The code is as follows:Copy code // Get the folder sizeFunction dir_size ($ dir ){If (! Preg_match ('#/$ #', $ dir )){$ Dir. = '/'; } $ Totalsize = 0;// Call the file listForeach (get_file_list ($ dir) as $ name ){$ Totalsize + = (@ is_dir ($
We know that the production environment of the product is definitely not incorrectly displayed, so:Change display_errors = Off to display_errors = On in php. ini.Or ini_set ('display _ errors ', 0 );Secondly, we know that the php error level is
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