Polymorphism refers to the same operations or functions, processes that can be used on multiple types of objects and obtain different results. Different objects, receiving the same message can produce different results, a phenomenon called
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
b/S: Web programs based on browser and server architecture
C/S: QQ SVN client + server
simple text-based protocols:
Redis
Memcache
difference:
are stored in the data, memcache directly saved to memory, Redis saved to memory, after the shutdown
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 describes the PHP to get the current page URL function example, share for everyone to reference. The implementation methods are as follows:
In PHP, there is no default function to get the URL of the current page, so today we're going
The example of this article describes the PHP custom APK installation package method, share for everyone to reference. The implementation methods are as follows:
As we all know, the APK format installation file is an Android Smart system
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
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
This article illustrates the implementation of PHP based on Base64 decoding image and encrypted image restoration. Share to everyone for your reference. The implementation methods are as follows:
In this case, $data is a base64 encoded picture. The
The function used is Curl_init, curl_setopt, Curl_exec,curl_close.
The default is the Get method, which allows you to choose whether to use headers:
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "$url");
curl_setopt ($ch, Curlopt_timeout,
This paper summarizes the common PHP sorting algorithm, which has good reference value in the design of the algorithm. We are now sharing them for your reference. Specifically as follows:
First, insert sort
A simple description of text, such as
What is the difference between PHP function method_exists () and is_callable ()? In the design process of PHP object-oriented object, we often need to call a certain method to belong to a certain class when the judgment, commonly used methods have
PHP Gets the function and server variables for the current URL path:
Code:
Copy Code code as follows:
$path =/usr/opt/. /ECT/ABCD;
echo $_server[' Document_root ']. " "; Get the server document root variable (depending on the
The example of this article describes the Phpmailer usage of the PHP mail sending class, and details its detailed operation steps. Share to everyone for your reference. The specific steps are as follows:
1. Install SendMail on the server
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
Paging function is a very common function of PHP programming, unlike in the past, today This article describes PHP is based on the array implementation of the paging function.
About the paging function of an array, the advantage of using an array
When writing the PHP template Engine tool class, a previously used regular substitution function of preg_replace (), plus the regular modifier/e, can perform powerful callback functions that implement template engine compilation (in fact, string
Recently, a PHP project used to limit the logon time function, such as the user login system after 60 Minutes if there is no operation to automatically exit, I searched the network has collected the following methods available for reference.
The
In many cases, we've been using skilled code from touching a new project to development and then looking back over the code we wrote. Therefore, in the completion of each new project, appropriate to do some project summary, code summary, perhaps you
The Web server executes a PHP script that can sometimes take a long time to return execution results, and the subsequent script will have to wait long to continue.You can do this by using the Fscokopen function if you want to implement a simple
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