The header () function sends the original HTTP header to the client.
Copy CodeThe code is as follows:
200 normal state
Header (' http/1.1 OK ');
301 permanent Redirect, remember to add a redirect address at the back location: $url
Header (' http/1.
When converted to Boolean, the following values are considered FALSE:
The Boolean value of FALSE itself
The integer value 0 (0)
The floating-point value 0.0 (0)
An empty string, and the string "0"
An array that does not include any elements
Objects
To extract some of Google's data, found that Google for the software to crawl its data masking, before the forgery of User-agent can capture data, but now it is not. The use of packet capture data found that Google has judged the cookie, when you do
Phpquery is a PHP-based open source project that allows PHP developers to easily work with DOM document content, such as getting headline information from a news site. More interestingly, it uses the idea of jquery, and you can work with the page
Example 1, PHP's own function can remove/delete the HTML tag/code in the string.
Strip_tags (String,allow): The function strips HTML, XML, and PHP tags.
Parameters: String, required, specifies the string to check, allow, optional, specify the
How to implement event monitoring, referring to JQuery's event binding ideas, simple implementation of a bit.
Main functions:
1. Binding events Support one event binding multiple actions, support binding one-time events
2. Triggering events
3.
Usually, PHP in order to have a browser brush to appear cookies, how to make cookies in time to take effect, the following to share a cookie in time to take effect a method, very practical,
The code is as follows:
Copy CodeThe code is as follows:
/**
PHP about the form to submit special character processing method to do a summary, mainly related to Htmlspecialchars/addslashes/stripslashes/strip_tags/mysql_real_escape_ A number of functions such as String are used together to communicate with
From the basic knowledge of PHP to the use of Zendsudio tool development has more than half a year, the process, learning intermittent, encountered the problem is also N, learning PHP is really not let people worry. The least worry is still the
With ziparchive compressed files, this is the PHP extension class, since the php5.2 version has been supported this extension, if you are using the error, check the php.ini inside the EXTENSION=PHP_ Zip.dll in front of the semicolon has not been
Recently in can PHP directory operation, made a directory infinite traversal:
The functions used are:
Isset () Determines whether a variable is defined
ChDir () changes the current directory to the specified directory.
Opendir () to open the
One of the main issues to be concerned with in database use is the exposure of access rights, i.e., user name and password. In programming for convenience, it is usually saved with a db.inc file, such as:
Copy CodeThe code is as follows:
$db _user
first, template storage and call rules
The template is stored in the System template directory, a directory under the template directoryExample: template/default/is a set of templates
Template files with an. htm extension that can be stored
root directory, template directory, and style directory:
{Dt_path} {Dt_skin}
To import the head foot:
{Template ' header '} {Template ' footer '}
Corresponding Module homepage:
{$MODULE [$moduleid][linkurl]}//Note: $moduleid indicates the ID number
Get an XML-type object:
Copy CodeThe code is as follows:
$resp = $this->c->execute ($req, $sessionKey);//Get an XML object
$items = $resp->items;
Then read the value of the object, with $items->item, or $items->item->price, so the operation is
PHP reads Excel, and the PHP package folder is a zip file,
1. Download the files locally and place them in Apache environment2.D.XLSX is a game server name and player list, this program is only suitable for this type of XLSX file structure, other
Will PHP not return cache lines? Multiple implementations
1. Universal Cache Technology:
Data cache: In this case, the data cache refers to the database query PHP cache mechanism, each time you visit the page, will first detect the corresponding
Common Vulnerabilities and code examples in PHP programming, examples of PHP programming vulnerabilities
Not impregnable, with the extensive use of PHP, some hackers are also in the absence of the trouble to find PHP, through the PHP program
PHP Use keyword overview, use keyword overview
usage of the USE keyword in PHP.
Many open source systems, such as the oscommerce framework, will find the use of this keyword in their source code, such as the oscommerce framework in the index.php
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