Here is a brief introduction to two types:
One, increase the time limit for timeoutsNote here: Set_time_limit only sets the time-out for your PHP program, not the time-out for the file_get_contents function to read the URL.
At first I thought
Although it is common to have a large number of array operations in PHP to some extent, there may be problems in program design, but it is necessary to approximate the memory occupied by the array.
First, feel the memory of the array of integers of 1
Before reading this article, make sure that you have mastered some knowledge of PHP and the basics of MySQL query operations.
As a web program, often to deal with countless data, such as the member's data, the article data, if only dozens of members
8. Construction method and destructor method
Most classes have a special method called constructors. When an object is created, it automatically calls the constructor
The constructor method is automatically called when the object is instantiated
Generic HTML standard hyperlink parameter get regular expression test
Because I'm going to do something like a professional search engine recently, I need to crawl all the hyperlinks in the web.
Everyone help test all of a sudden, the following code
Or use strcmp to judge, but this can tell you whether the two strings are equal, but can't tell you where the difference is.
My idea is that a single string is divided into letters (character) so that comparisons can be made to know exactly where
12. Overloading the New method
In the language of learning PHP you will find that the method in PHP is not overloaded, so-called method overloading is
Define the same method name, with different "number of parameters" or "type of parameter" to
The idea of uploading and downloading PHP files is similar. That is, there is one more header statement in the code.
The following is the detailed code. For reference only.
Entry file
Copy CodeThe code is as follows:
Processing files
the Chinese string for UTF-8 is three bytes
Copy CodeThe code is as follows:
Code UTF-8
echo strlen (' Test text a Test text ');
Echo '-';
echo mb_strlen (' Test text a Test text ', ' utf-8 ');
?>
Output: 25-9
the Chinese string for GB2312 is
The PHP batch gets the value of the checkbox
1. Naming
2. Use
When the plan is part of a SQL instruction: if the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox '))) {
$expr = Join (",", $_post[' checkbox ');
Resin in the new version began to support PHP, I feel more fun, is too lazy to configure a group of Apache_php_mysql on their own machine, after all, Java-based to do things. So will own a PHP site directly resin inside do development, the overall
is contains this function, the book describes that this function is based on the elements of the content to filter the selected element set, when I run the code is always error, and later found that the function library does not have this function,
"Php_self"
The file name of the currently executing script, which is related to document root. For example, using $_server[' php_self ' in a script with a URL address of Http://www.jb51.net/test.php/foo.bar will give the result/test.php/foo.bar. The
The first is the home page, which contains a text input and an IFRAME that displays the chat content, and a hidden iframe for submitting form forms:
Copy CodeThe code is as follows:
chat.php
Header (' cache-control:private ');
Header ('
The specific implementation code, as follows: The following will give a simple explanation.
Copy CodeThe code is as follows:
/*
1. Configure your database connection
2. Note that the prefix of the data table name defaults to Dede_
3. Be sure to
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