The following code implements the $_get and $_post parameters for filtering PHP
The code is as follows
Copy Code
/*** Security Precautions*/function add_s ($array){foreach ($array as $key => $value){if (!is_array ($value)
1, login into the VPS Control Panel, ready to reboot the VPS at any time.2, shut down the Web server first, too much load will cause the subsequent operation is difficult, or even directly unable to login SSH.3, just in case, the setting of the Web
The code is as follows
Copy Code
?/*************************DescriptionDetermines whether the passed variable contains illegal characterssuch as $_post, $_getFunction:Anti-injection*************************/Illegal characters to
The code is as follows
Copy Code
Public Function Captcha () {$font _dir = $_server ["Document_root"]. "Your_ttf_file.ttf"; Font Library$img _w = 58; Set Picture width$img _h = 20; Set Picture height$font _size = 11; Font size$angle _
The code is as follows
Copy Code
The code is as follows:/* Site Verification Code Program* Operating Environment: PHP5.0.18 Debugging through* Need GD2 Graphics library support (Php_gd2.dll Open in php.ini)* FileName: showimg.php*
The first is to use the verification code, others manually brush the ticket, or even the site to spend hundreds of of dollars to buy a verification code recognition programLimit IP address, unplug the network cable on the IP, Taobao 2 dollars can
We just need to add in the PHP tutorial. ini
Disable_functions =phpinfo
PHP.ini introduces a feature disable_functions, which is useful and can be used to disable some functions. For example, in php.ini, add disable_functions = PassThru exec
/*************************DescriptionDetermines whether the passed variable contains illegal characterssuch as $_post, $_getFunction:Anti-injection**************************/Illegal characters to filter this filtered character can also be
Since registering often uses the registration code to prevent the machine from malicious registration, here I publish a PNG image verification code basic images, very simple but the idea is very clear:1, produce a picture of PNG2. Set the background
This is a tricky issue when users submit a form because of the speed of the network or if the Web page is maliciously refreshed, causing the same record to be repeatedly inserted into the database. We can start with the client and server side to try
The PHP implementation Method is in the interface, post delivery mode, the data is transmitted as a string, and the returned data is encapsulated with JSON. and then start a variety of tests. Sharing the final method: defines a crawl
Suppose the PHP directory is/usr/local/phpMySQL directory for/usr/local/mysql1. Enter the PHP source code package EXT/PDO Directory
CD Ext/pdo
2. Execute/usr/local/php/bin/phpize[assume that the installation directory for PHP is/usr/local/php]
1. Install Phpize (if it is compiled with PHP source code is free, itself)
2. Open the PHP source code, EXT has Ext_skel tools, use it can be convenient
./ext_skel--extname = Myext
After you build the extended framework, you need to
Php creates a solution for remembering the password for automatic login, that is, to operate sessions and cookies.// Check whether the user logs on The code is as follows:Copy code Function checklogin (){If (empty ($ _ SESSION ['User _ info']) {/
1. Download memcache and put it to your drive letter, for example, d: memcached.2. Start-> cmd-> enter the command d: memcachedmemcached.exe-d install3. Enter d: memcachedmemcached.exe-d start after installation.4. Download php_memcache.dll and put
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