Most of the operations with PHP are working with a variety of databases, including Mysql,redis,memcache and other relational and relational databases, so an application will have a large number of connections to the database operation, if not a
Using the Mod_gzip module in Apache, we can use the GZIP compression algorithm to compress the content of the Web page published by the Apache server and then transfer it to the client's browser. If the content is plain text, the effect is very
This article introduces some techniques to introduce the defense of the PHP Trojan attack, through these aspects you can better guard against Trojan horse program.
1, prevent from jumping out of the web directory
First modify httpd.conf, if
PHP memcache independent PHP Implementation, is the old client, from our practice has found that there are many problems, and less function, attributes can also be set less;PHP memcached is based on the libmemcached extension of native C, more
An interface is a form of constraint that includes only member definitions and does not contain content that is implemented by members. with interfaces (interface), you can specify which methods a class must implement, but you do not need to define
HTTP protocol client class HttpClient to introduce the method of PHP POST HTTP request, this class you can go to the official http://scripts.incutio.com/httpclient/index.php download can also download click Download attachment
After the download,
The easiest way to find the PHP installation directory pecl
Automatic installation
#/USR/LOCAL/PHP/BIN/PECL Install APC
Then follow the prompts step-by-step to complete
Then configure the end of/usr/local/php/etc/php.ini to join
A, definitions and usage
The Strip_tags () function removes the HTML, XML, and PHP tags in the string.
Strip_tags (String,allow)
Parameter description
String required. Specify the string to check.
Allow optional. Specify the allowed label.
The set value of the MAGIC_QUOTES_GPC will affect the data obtained through get/post/cookies
This two-day access to the Baidu SDK processing payment callback encountered a signature pass, the signature rule is very simple, MD5 (Transdata + Appkey)
In addition, the windows line break is "rn" and the linux line break is "n"The php ip record function is $ _ SERVER ["REMOTE_ADDR"]PHP obtains the current time function date ("Y-m-d H: I: s", time ())PHP functions for obtaining the origin site $ _
When extracting Fckeditor, use the followingPHP uses $ _ POST ['p _ info'] to obtain the value of FCKeditor.Supplement:1. The basepath path must be the same as the include path above. Otherwise, the file cannot be found)In addition, if you want to
Instead of executing the if block data query statement. Of course, there are many things to consider in actual use, such as setting the validity period and the cache group.Class cacheexception extends exception {}/*** Cache abstract class*/Abstract
Three php file deletion codes The code is as follows:Copy code If ($ od = opendir ($ d) // $ d is the directory name.{While ($ file = readdir ($ od ))! = False) // www.111cn.net reads files in the directory {Unlink ($ file); // $ file is
The code is as follows:Copy code Function pinyin ($ _ string, $ _ code = 'utf-8 '){ $ _ Datakey = "a | ai | an | ang | ao | ba | bai | ban | bang | bao | bei | ben | beng | bi | bian | biao | bie | bin | bing | bo | bu | ca | cai | can | cang |
If ('source' = $ _ get ['act ']) {// view the source codeShow_source ($ _ server ["script_filename"]);Exit;} // End ifSet_time_limit (0 );For ($ I = 0; I I $ Users [] = 'Tom _ '. $ I;} // End$ Width = 500; // The length of the displayed progress bar,
Untitled Document // Php file Upload class (this class supports uploading of one or more files)/*** Class name: upfile* Function: process file uploads.* Description: This class processes Upload of one or more files. When using this class, you only
Get protocol-httpThe url protocol can be read in the $ _ server ['server _ protocol'] variable.*/Echo $ _ server ['server _ protocol'];/*If you check the value, you can find that not only http or https, but such a string: http/1.1*/$ Protocol =
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