Full instance
Automatically detect the background and font, and randomly select a range of background pictures, random use of fonts, display validation string randomly display font size, character spacing, character color, etc.
The code
Allow PHP download code to support breakpoint continuation of the main HTTP protocol header Content-range to achieveLet's say the download principle of HTTPFor HTTP protocols, when you request a file from a server, you can send a request similar to
The principle of preventing a malicious brush page is
Requires a validation string to be passed between pages.Randomly generates a string when the page is generated,As a must parameter is passed in all connections. At the same time, save the string
Ob_start Ob_get_flush These functions are one of the caching techniques that reduce server pressure until project development is used to understand the confusing and cached concepts,These functions, such as Ob_start Ob_get_flush, are the techniques
Using HTML to write JavaScript to introduce a PHP link, the PHP is actually generated JS files:
The code is as follows
Copy Code
if (= = = $ad _type_id) {//CoupletOb_start ();Include Tmpl_path. ' Code/duilian.js ';Header
Specifically what day began to contact with PHP, silently this dull brain has not been able to remember, but it should be said that time is not short, although I often is yesterday's thing to forget today. I used to have a lot of choices when I
Misuse of include
1. The reason of the loophole:
Include is the most commonly used function in writing PHP Web sites, and supports relative paths. There are many PHP scripts that directly take an input variable as an include parameter, resulting in
directory, file operation details-php
Write a file and read the file in the same way, first see if you can write: $file = ' dirlist.php ';if (is_writable ($file) = = False) {Die ("I am
1. Collation of Strings: Chop (), Itrim (), Trim ()
The trim () function is used to organize user input data, as shown below:
$name =trim ($name);
$email =trim ($email);
The Tirm () function can remove spaces from the start and end of a string
This would have been the basic use of the session, but in PHP is not the spirit. However, we can register the session variable as "global variable across Windows." But there is a condition that you want to send a variable named Session_name () with
We all know that using Php+mysql in the Web page to implement the database data display is very simple and interesting, very few database data in the case of the page display is still satisfactory, but when the database data is very many cases, the
Here can be used to 2 kinds of methods, one is to use Preg_match to verify, one is to use JS to judge.
First, the PHP method
The code is as follows
Copy Code
Preg_match ("/^[0-9a-za-z]+@" ([0
Chinese matching in utf-8 environment
\w match only Chinese, numbers, letters, for the Chinese people, only match the English will often use, see
Matching regular expressions for Chinese characters: [\U4E00-\U9FA5]
Maybe you also need to match
This is the Nginx and PHP installation notes that the webmaster recorded when they installed the server at one time in 2011. Installation process records are simple, just a rough flow, some details are not detailed description, please forgive me, I
View server PHP List
Yum List | grep phphttp://dl.fedoraproject.org/pub/epel/5/x86_64/
#rpm-IVH http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RPM-IVH
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