Although the PHP language function is powerful, but also needs the programmer to write the specification, creates the performance superior code program. Here we share PHP's performance optimization techniques.
"Replace i=i+1 with I+=1." In line
Simply wrote a PHP image processing class library, although the function is relatively few, but at present also useless to too advanced, later used to fill it, or who to point to add what function, or what the demand can tell me, I have time to add,
IIS is used as a Web server under Win7, but recently because of the requirements of the project, it is necessary to automatically make a turn when the server encounters a 404 error (not on the client's jump, but when the server receives the client
One, PHP script and dynamic page.
PHP script is a server-side scripting, can be embedded and other methods and HTML files mixed, but also class, function encapsulation, such as the form of templates to the user request processing. In any way, the
Empty (), Is_null (), isset () Truth-table (difference)
Let's take a look at the functional descriptions of these 3 functions www.111cn.net
Isset determines whether a variable already exists, returns TRUE if the variable exists, or
php to query the contents of the MySQL database we must first connect the MySQL database, and then use the SQL statement to query, let's take a look at some examples. SQL has many statements to manipulate the database. But the common and
This article is mainly on the PHP require and require_once The difference is introduced, the need for friends can come to the reference, I hope to help you
Include () and require (): The statement includes and runs the specified file.
Include ()
The failed to open Stream:permission denied in is the Apache run user does not have permission to access the specified file, causing the directory file to open.
Prompt when you open the browser
Warning:include (/global.php) [function.include]:
Definitions and usage
The Array_intersect_key () function uses the key name comparison to compute the intersection of an array.
Array_intersect_key () returns an array that contains the values of all the key names that appear in the array being
If you are designing with Dreamweaver or FrontPage, then unless you deliberately delete them, they all exist. Let's do it step-by-step and improve the search engine in the project.
First, design a search formBuild a search.htm in the root
php Strlen is the number of bytes returned, for UTF8 encoded in Chinese returned 3, does not meet the requirements, the following to provide you with a method to complete such a function Weibo's speech has the word limit, its counting way is, the
This article mainly introduces the PHP implementation file download a simple example, the need for friends can refer to the following The code is as follows: Public function downloads ($name) {$name _tmp = explode ("_", $name); $type = $name
Let's start by saying that this is not a home counter, although the principle is the same as it is.
One: Prepare a count file, store the link URL and the number of visits, the format is as follows
Id|url|count
ID is the index number to find, URL is
Now we have files that need to be cross-referenced through the $REMOTE_ADDR variable, so that we can tell if the user who wants to post has been flattened or not flattened. Very simple:
For ($counter =0 $counter if ($banned _array[$counter] = =
PHP is a very good tool, it can be simple, but also can be complex. Different items should be used in a different PHP.
Small items-simple and straightforward PHP
Generally for a functional page under 20 of the site, we can use a very simple frame
Throughout the file, in order to keep the original file from being corrupted, I took the following way
1, can be directly annotated, in the ";" after adding.
2, if it is not easy to annotate directly, then add another, but all with ";;" Start
Aphache do server:
Install Apache and configure it to support PHP
Install Apache in the D:\website\apache directory. Apache installation process needs to enter the site domain name, local debugging use localhost can, installation process is very
The name of this section is Fsockopen,curl and file_get_contents, specifically to explore some of the three ways of network data input and output of some of the summaries. There has been a lot of talk about Fsockopen, and the following starts with
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