1, the basic principles of data filtering of PHP submission
1 Submit variables into the database, we must use Addslashes () to filter, like our injection problem, a addslashes () is done. In fact, when it comes to variable values, the Intval ()
The main security measures are in the following two areas.
1, to prevent the attacker to obtain the user's session ID.
There is also a more covert approach, where an attacker redirects a user on a hacked site to another site through a Web site
1, delete HTML annotation;2, delete script, link, object, embed, IFRAME, frame, frameset and have on the beginning, including Web page effects: [^;] or expression the label of the attribute;3, delete the annotations in the CSS tutorial (prevent this
MCrypt Simple Introduction
PHP programmers in writing code programs, in addition to ensure the high performance of the code, but also is very important, that is, the security of the program. In addition to the several encryption functions, PHP has
Class implementation idea is: first to print the data are collected, in the use of JS call window printing function. Currently used for IE.
class provides print queuing functionality. (PS, plainly is a piece of reading data)
The code is
For most cryptographic cryptography, we can use MD5, SHA1 and other methods. Can effectively prevent data disclosure, but these methods apply only to data encryption that does not need to be restored.
For information that needs to be restored, a
The performance breakthrough in PHP 7 has become one of the hottest topics in recent times, and currently the official PHP 7.0.0 Beta 2 has been releasedNew featuresPerformance Improvement: PHP 7 is twice times faster than PHP 5.6Full and consistent
Use PHP to send red envelopes, when we enter the number of red envelopes and the total amount, PHP will be based on these two values to randomly allocate each amount, to ensure that everyone can receive a red envelope, each red envelope amount of
The following is a class. How to use:
$arr [' OpenID ']= ' ojgttt8of9vdycgsjmachpa-jy1u ';$arr [' Hbname ']=] "application for submission";$arr [' Body ']= ' your present application has been successful];$arr [' Fee ']=1;$comm = new Common_util_pub
Companies want to adjust the price of products, because do the foreign trade Mall, so the price and international standards. For example, foreign prices show the way is: the identification of the $35.00; $56.2 is identified as: $56.20.
sprintf ("%1\
One of the most frequently asked questions about new hires for a company is the value of PHP type conversions, such as:Var_dump ((int) true);Var_dump ((string) true);Var_dump ((string) false);Var_dump ((BOOL) "1");Var_dump ((BOOL) "0");Var_dump
How do you find out what caused the CPU to soar with the CPU approaching 100%? My idea is to first find the lines of code that the process is executing to determine which code snippets may be problematic. Then, carefully analyze the problematic code
VPS is the CentOS system, PHP for Nginx+fastcgi,nginx installation directory/usr/local/nginx,php installation directory/usr/local/php, start in Linux install PHP accelerator eaccelerator Bar!
Pre-compiling installation EacceleratorPrepare before
The common functions for calculating string lengths in PHP are: strlen and Mb_strlen
Compare strlen and Mb_strlen
1.strlen PHP Built-in string length function2.mb_strlen is not a PHP core function, you need to be sure to load the Php_mbstring.dll
Before starting to learn PHP, the first thing we need to do is to know what PHP is, what PHP has to use, the characteristics of PHP and so on. PHP is a powerful server-side scripting language for creating dynamic interactive sites.
PHP is free and
In php Tutorial 5, the variable type is uncertain. A variable can point to any type of value, string, object, resource, etc. We cannot say that the polymorphism in php5 is a variable.We can only say that in php5, polymorphism is applied to the type
/*The following php flash file generation code is from simple swf file generation to flash animation file generation. Each instance is classic.*/// First enable php extension php_ming$ F = new swffont ('_ sans ');$ T = new swftextfield ();$ T->
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