SQL injection:
Under normal circumstances:
delete.php?id=3;$sql = ' Delete from news where id = '. $_get[' id '];
Malicious situation:
delete.php?id=3 or 1;$sql = ' Delete from news where id = 3 or 1 '; When-------do so, all records will be
PHP for case sensitive problem processing is messy, write code may occasionally problem, so here is summed up.But I am not encouraging everyone to use these rules. We recommend that you always adhere to the "case sensitive", follow the Uniform Code
That is because the php.ini turned off the error display, the error written in the file, this is the result of artificial settings, Display_errors =on is good.
However, error-safe points are not displayed, it is recommended to open when debugging,
PHP supports the concept of variable functions. This means that if a variable name is followed by parentheses, PHP will look for a function with the same name as the value of the variable and try to execute it. Variable functions can be used to
This article illustrates several common considerations for using static methods in PHP. Share to everyone for your reference. The specific methods are as follows:
1. even if the method in the class is not declared with static, but it is not used to
360 Publish the general PHP Protection Code, in fact, initially to help phpcms to protect the use of security, it appears to be able to join any of the loopholes in the site, take phpcmsv9 problems, the solution is as follows, other sites and so on!
Use of one reflex:
Copy Code code as follows:
Class person{
Public $name;
function __construct ($name) {
$this->name= $name;
}
}
Interface module{
function execute ();
}
Class Ftpmodule implements module{
function Sethost ($host)
Simple file downloads require only the use of the HTML connection tag , and the URL value of the attribute href is specified as the downloaded file. As shown:
download file
If the above code to implement file downloads, only some of the browser
There are very handy ways to reorder arrays in PHP--asort, the use of Asort can be seen here. However, when sorting an array containing Chinese keys, asort is sometimes not in alphabetical order. This is mainly a coding problem, if the encoding for
First, the realization principlein the PHP function, the global syntax is more common, we must all know once in the function of global an external variable, this variable can be used in this function, but there are many users do not know what this
Work needs to scale some GIF and then go to Imagecopymerge, but found that the use of Imagecreatetruecolor and imagecopyresampled later found that the background map is not right, the original transparent background image into black, It was later
Get post binary raw data, select a build path and the name of the picture, then write, the idea is very obvious
Generate picture
$imgDir = ' uploadimg/';
$filename = "NISSANGCJ". $mobile. ". JPG ";///the name of the picture to be
Recently uploaded pictures in the project, about more than 300 k, the results reported a server error, never encountered before, the error is as follows:
Mod_fcgid:http Request Length 132296 (so far) exceeds Maxrequestlen (131072)
Check the data,
Let's talk about the format of the switch () statement
switch (expression) {
Case Match 1:
When matching 1 and the expression match the successful execution of the Code;
Break
Case Match 2:
When matching 2 and the expression match the
This article describes the PHP implementation of Get,post,multipart/form-data HTTP request class and its application, share for everyone to reference. Specifically as follows:
The HttpRequest.class.php class files are as follows:
_ip = isset ($
php5.3.3 before PHP-FPM has not been included in PHP, configure PHP basic php.ini inside, php5.3.3 and later, in addition to php.ini configuration, can also be configured in the php-fpm.conf.Multiple places can be configured, there is a priority.
This article describes the PHP implementation of AES256 encryption algorithm, is a more common encryption algorithm. Share to everyone for your reference. Specifically as follows:
aes.class.php files are as follows:
6 && $i% $Nk = = 4) {$temp
ODBC Connection class functionsOdbc_connect function: Open an ODBC connectionOdbc_close function: Closes an ODBC connection that is already openOdbc_close_all function: Turn off all ODBC connections that have been openedOdbc_pconnect function: Open
Recently, there are Buboyu asked php.ini which directory? or modify the php.ini after why not effective? Based on the above two questions, I think it is necessary to teach the friends who have just contacted PHP how to find the path directory of PHP
Php_screw is really good, but it can only play the role of encryption, and does not accelerate and optimize the role.
Let's take a look at the following:
Turck MMCacheIts role is through the compilation of PHP code to accelerate, optimize the 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