Recently studied some of the crawler-related code, you can simply understand that the crawler is actually access to the page, and its information to a certain extent or processing, to achieve their intended goal of the program, after studying the
Linux Environment installation PHP fileinfo extension
Windows Environment installation extension is relatively simple, just copy the DLL to the extended directory, modify the corresponding extension in the php.ini.
The following is an
Not accustomed to using cookies, before making a shopping cart is to allow users to log in before buying, so I can store the goods in the cart into a data table, wait until the order to transfer them to the table of another order. But the customer's
Wrote three examples of PHP quick rows:The first is low, but easiest and easiest to understand,The second one is a one-way traversal search median method provided in the introduction to the algorithm,The third is a bidirectional traversal to find
Recently in the study of some POC, found that most of the POC will have such a ini_set (' Default_socket_timeout ', 5), meaning that the configuration Default_socket_timeout set the parameters of 5. Do not know what the meaning of this configuration,
The GeoIP extension can obtain user detailed location information through an IP address. is a key-valued way to access data. Geocounty => GeoIP.
Example:
? PHP
include (' geoip.inc.php ');
Open Data file
$gi = Geoip_open ("GeoIp.dat",
The old rules, first code before talking.
"; The function showobj ($obj) { echo $obj.
" ";
}
Mswap passed in a reference type.
Function Mswap (& $a,& $b) { $tmp = $a; $a = $b; $b = $tmp;} Function Bubblesort (& $cols) { $len =count
The following is the deployment of PHP 4 configuration change instructions, one for each study.
1, Short_open_tag is what it is.Determines whether to allow use of the abbreviated form of the Code start flag (?>).
If you want to use PHP in
Cookies Operation class
function:
1. Save, read, update, and erase cookies data.
2. You can set a prefix.
3. Force timeout control.
4.cookies data can be strings, arrays, objects, and so on.
Cookies.class.php
_prefix = $prefix;
} if
Have nothing to do, play a Linux curl command. Very simple requirements to carry cookies to forge legitimate post requests.
First of all, copy the parameters of the Curl command:
Syntax: # curl [option] [url]
-a/--user-agent Set User
I. Download and decompression PHP5.6.9
wget http://cn2.php.net/distributions/php-5.6.9.tar.gz
tar-zxvf php-5.6.9.tar.gz
cd php-5.6.9
two. Compile PHP5.6.9
Compile the deployment (throw the above compilation script directly into the current SSH
"2010/3/8"
1:Array_pop ($array ());//php Delete the last element of the arrayArray_shift ($array ());//Delete First element
2:java1.5 written on the program, let put on the java1.4 server running, how to do, Internet search a bit,The following
Online operation of a set of auxiliary system is used to change the open source of PHP, has not played a lot of PHP before, did not think that this thing still has many pits. Suddenly one day a user doing online activities to promote, and then in a
Recently used PHP to do projects with a post to submit data and there is a session to do the record, run up, but there is a small problem, is submitted after the previous page will be back when it would appear page expired, to click Refresh can open
1. PHP session working principle
The session file is stored on the server side and, by default, the directory saved by the session file is specified by Session.save_path, the filename is prefixed with sess_, followed by the session ID, such as:
I. Description of Sssion1, through the session (cookie is another solution) to record the user's information, for the user again in this capacity to request the Web server to confirm. The invention of the session allows a user to save his
Ask a question
In app interface development, we often put some device information, or general parameters into the request header, but how do we use PHP to receive these request headers information.Post Pass value We often use the Form_data type,
Display_errors=on Open PHP error prompts, the line item should be set to off
error_reporting (e_all);//test page output error hint
ini_set (' display_errors ', TRUE)//Error output prompt, this page is valid, priority is higher than
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