Use PHP GD, use good, one key to cut various sizes, pack and download. Always change the icon to understand, art to give you a 1024 logo, you have to PS a variety of sizes, so have this thing.
Core code
Copy Code code as follows:
Class
Searches for a specific value in the array and returns False if it finds return true
Boolean In_array (mixed Needle,array Haystack[,boolean Strict])
Finds a specified health in the array and returns False if found return True
Boolean
The invocation method is as follows: one of the DEBUGSTR functions is like an echo.
Copy Code code as follows:
Debugstr (' $Adv->getcontentbyid ($id); $id for the advertisement number, only one call, the return content is a string ');
Using file suffixes and MIME type detectionUsually when we want to strictly restrict the file type, we can simply take $_files[' myFile ' [' type '] to get the MIME type of the file and then check whether it is a valid type.
Or we can take the last
1, and PHP manuals become good friends
2, open the error Reporting
The error reporting is helpful in PHP development. You can find errors in your code that you didn't find before, because not all bugs are going to run the program. When the product
Let's talk about how SQL injection attacks are implemented and how to guard against them.
Look at this example:
Copy Code code as follows:
supposed input
$name = "Ilia"; DELETE from users; ";
mysql_query ("SELECT * from users
It's written in front.
PHP can also do great things is my summary of PHP syntax features and related functions of the class Library classic usage, it is not necessarily true to achieve 42 of the effectiveness of the dial, but master these methods,
Ihipop School of Discuz X1.5 Forum was black, where a quarrel for an afternoon. Google "discuz! x1-1.5 notify_credit.php blind SQL injection exploit ", you know.
Discuz is a very popular forum system in China, it should be a lot of black sites. But
After 4.1.0 from PHP, the original location may change as the value of the usort is compared, as the document says:
If two members compare as equal, their order in the sorted array is undefined.
That is, if the 2 values of the comparison are the
In PHP, there is a function called Strtotime. Strtotime implementation: Gets the timestamp of a date, or gets a timestamp of a time. strtotime resolves a date-time description of any English text to a UNIX timestamp [converts system time to UNIX
This article illustrates how PHP uses the Ksort () function to sort the associative array by key. Share to everyone for your reference. The specific analysis is as follows:
PHP uses the Ksort () function to sort the associative array by key, the
The example of this article describes how the PHP implementation automatically scrolls the display of the picture. Share to everyone for your reference. Specifically as follows:
Specifies a picture directory that automatically scrolls through each
This article illustrates how PHP implements a video to MP4 and get a video preview. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Flv_convert_get_thumb (' Input.avi ', '
Apache Mod_rewrite is more powerful, in the site construction, you can use this module to achieve pseudo static.
The main steps are as follows:
1. Detect whether Apache open Mod_rewrite function can be provided by the PHP phpinfo () function to
1, this is a thumbnail class library
It is an open source picture thumbnail class Library, can complete a variety of complex picture thumbnail generation and reality, very convenient to use.
2, the use of methods
Here is a simple and practical
Introduced
Today, php5.1.* and php5.2.* are found to be different when the database precompiled code executes.
Pre-compiling benefits
1. Use placeholders to avoid entering data verbatim into SQL. Automatically handles the escape of characters such
Hackers can get access to the website database through SQL injection, then they can get all the data in the database of the website, the malicious hacker can manipulate the data in the database through SQL injection function and even destroy the
The example of this article describes the method of Php+xml combining Ajax to realize the point-praise function. Share to everyone for your reference. Specifically as follows:
Use XML, PHP, and Ajax to implement the point-and-click functionality
This article illustrates the method of Php+mysqli database query using preprocessing technology. Share to everyone for your reference. Specifically as follows:
The code has some difficulty, needs the basic knowledge to be able to understand better,
This article summarizes the method of filtering and replacing PHP strings. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Class cls_string_filter{
Turn \ n into --, is that
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