This is the data URI scheme defined in RFC2397, the purpose is to embed some small data directly into the Web page, so that no longer load from the external file, such as the string of characters above, is actually a picture, these characters are
With Pear::benchmark, you already know how to test your code, know how to determine if your code is fast or slow, and which part is slower. So the next thing I want to say is how to eliminate or optimize that part of the slow code. My personal main
5. Other Miscellaneous5.1 Generating Images PHP can manipulate image processing. If you have installed the GD library, you can even use PHP to generate images.?Header ("Content-type:image/gif");$string=implode ($ARGV, "");$im = Imagecreatefromgif
Create an Object
$timer = new Benchmark_timer ();
Start the timer.
$timer->start ();
A piece of script for testing
For ($i =0 $i {
We don't have any here
}
Set markup
$timer->setmarker ("Mark1");
To output between two points
echo
Set the size and color of the label font by the click-Through tab
This procedure does not consider the program performance and function encapsulation ... Just want to express this algorithm
The specific code is as follows:
?
PHP
function
Showtag (
User authorization is also a part of the advanced interface, just separate it out, so that the entire micro-letter framework is clear, but we use it first to set the OA2 URL in the micro-letter background, where the URL and tutorial a different. It
This problem has been encountered by the cliff before, too long did not write do not remember (seems to be the CI frame directly related functions), and then met again, rolled to check again, here is not the case is PDO, but with the outdated
Installing Smarty is to include the Smarty class library in your own PHP project. The installation steps are as follows:
(1) need to smarty official website http://www.smarty.net/download.php Download the latest stable version, all versions of the
How to disable PHP promptsSearch for php. ini: The code is as follows:Copy code Error_reporting = E_ALL Changed: The code is as follows:Copy code Error_reporting = E_ALL &~ E_NOTICE There is another way to do this:Add each file headerError_
The Yaf PDO encapsulation class of php framework is integrated with ORM. yaf itself does not contain orm data encapsulation. We can implement our own encapsulation on pdo.I. First, we use the php Singleton mode to create a base class. Library \ Base.
When using nginx for webserver, pay special attention to the client_max_body_size parameter when uploading large files. Otherwise, the access will be interrupted in nginx requests and cannot be recorded in php.First, modify the php. Ini file:
PHP disables access from an IP address or IP address segmentNot much nonsense. For more information, see: The code is as follows:Copy code // Disable an IP address$ Banned_ip = array ("127.0.0.1 ",// "119.6.20.66 ","192.168.1.4");If (in_array
Js code regular The code is as follows:Copy code 'Si ", // remove javascript In use at first, m indicates multi-row Matching. The test can replace multiple single rows. The code is as follows:Copy code Preg_replace ('//M', '', $ html );
Once a variable is set, we can reuse it in the script.All variables in PHP start with the $ symbol.PHP code insertion is intuitive, " "End. All variables start with "$", for example, "$ money ". (Definition operators are easy to imagine.) when you
PHP determines the browser type and language, because when the browser connects to the server, it will first send some content containing its own information (browser type and language ).Here we mainly analyze _ SERVER ["HTTP_USER_AGENT"] (browser
PHP $ _ GET and $ _ POST variables are used to obtain information in the form, such as user input information.PHP4.1 (like) cancels the direct receipt of variables, and uses $ _ GET ['variable name'] to receive the variables passed from the link,
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