The following is a summary of common form special character processing:
Test string:
The code is as follows
Copy Code
$dbstr = ' D:testHTTP://WWW.111CN.NET, Tian Yuan Blog'!= ' 1 ' OR ' 1 'php OUTPUT";?> ';
Suggestions for security issues with PHP code
PHP includes any other network programming language security, specifically in the local security and remote security two aspects, here we should develop the following habits to ensure that our PHP
Byte code cache component Zend optimizer+ now change the name to Zend Opcache. And after the PHP 5.5 version, will be integrated into the official PHP components, there is no need to install other apc,eaccelerator and so on.
APC and Opcache are
What is a spiral matrix? The spiral matrix is a spiral matrix, its number from the first line began to the right to become larger, down to the big, to the left, the larger upward, so cycle. The following figure is an example of a helical matrix:
The core code is here.
The code is as follows
Copy Code
Header ("Content-type:application/vnd.ms-excel; Charset=utf-8 ");Header ("Pragma:public");Header ("expires:0");Header ("Cache-control:must-revalidate, Post-check=0,
Brief introduction
SPL is all called (Standard PHP library,php Standard library), from the official document, SPL mainly contains the following blocks:InterfaceDataIteratorsAbnormalfunction enhancementArrayobjectSqlfileinfoOne, interface
Before you store the user information in the PHP session, you must first start the conversation.
Note: the Session_Start () function must precede the label:
The code is as follows
Copy Code
on
Face code
PHP Part FAQ Summary-REPRINT
1: Why I can't get a variable
I post data name to another page on one page, why can't I get any value when I output $name?
Register_global defaults to off in later versions of PHP4.2
To obtain a variable
Recently, their own use of vacation time to learn PHP, perhaps we do not know what PHP is? PHP is a web-embedded language, just like asp,jsp, which should be the easiest language to learn in programming. A few years ago, when I was on the Yeda, the
Weekend free to see the prototype model, which talked about shallow copy and deep copy, think of PHP in the corresponding assignment, cloning and cloning is a shallow copy or deep replication.
Let's take a look at the assignment, such as a resume
PHP method for obtaining page execution time (recommended), php method for obtaining
You can add the following lines of code to the header and end of the page to know the page execution time:
Header:
Tail:
$ Etime = microtime (true); // get
See the two functions.Implode function:Use the implode function to convert an array to a string.Explode function:Use the function explode to convert a string to an array.Example 1.Today, I saw a post in the php forum asking my friend how to convert
Cookie and session statusFor BS development, these two concepts are essential. First, let's take a rough look. It is difficult to go deep without practical applications. For more information, see the reference address!What is Cookie?Cookie is a
Fopen function The code is as follows:Copy code Function get_file ($ url, $ folder, $ pic_name ){Set_time_limit (24*60*60); // you can specify the maximum execution time.$ Destination_folder = $ folder? $ Folder. '/': ''; // file download and
The news file is stored in a fixed directory in the format of the ultimate file. Txt, and the publishing of news can be completed automatically.This process consists of two parts:First, the display of news is implemented by the shownews. php script.
Its Project address: php Tutorial-debug-tools/"> http://freshmeat.net/projects/php-debug-tools/File Download Address: http://freshmeat.net/urls/7c58ae3fecce5763e7546b958d36e082Version 1.03The environment here is Windows xp, apache2.2, php5.2 + zend
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