Starting from Zend Framework v0.13, I began to learn how to use Zend Framework. At that time, Zend Framework was also used for a company project. No more details will be taken into account after version 0.6. A few days ago, I heard that Zend will
1. TheoryGenerally, the passwords in the form are transmitted to the server in plain text for processing. This undoubtedly gives the bad guys a chance! Let's talk about how to transmit a password to ensure security!It is better to transmit the
EAccelerator is really a good thing (its predecessor is truck-mmcache ).Simply put, it is a cache system that works with PHP (supporting PHP5) and exchanges data through shared memory or disk files.It is widely used in PHP source code "encoding"
During development, we should pay attention to preventing SQL injection. Therefore, we must process the values submitted in the form to update the data to the database.Php functions. Any value can be passed for conversion.Copy codeThe Code is as
Mod_gzip is an Apache module that uses Gzip to compress static html pages. IETF-compliant browsers can accept gzip encoding (IE, Netscape, etc ). Mod_gzip can increase the page download time by 4-5 times. I strongly recommend that you use mod_gzip
Add text to your image at any timeHeader ("Content-type: image/jpeg ");Function makethumb ($ srcFile, $ text, $ size = 12, $ R = 0, $ G = 0, $ B = 0 ){If (! $ Text ){$ Text = 'Welcome xs.net.ru xayle ';$ Size = 20;$ R = 255;}$ Data = GetImageSize ($
$ Xml = simplexml_load_file ('example. xml'); // create a SimpleXML objectVar_dump ($ xml); // output XML?>
$ Xml = simplexml_load_file ('example. xml'); // read the xml fileForeach ($ xml-> depart as $ a) // read each depart tag in XML data
The following php functions are the most commonly used project development functions of it Power. These functions are used in many projects and are also quite common.1. processing functions of the Request InterfaceCopy codeThe Code is as follows:/***
Serialize () and unserialize () are described in the php manual as follows:Serialize-Generates a storable representation of a valueSerialize-generate a representation of a stored valueUnserialize-Creates a PHP value from a stored
Syntax: void set_time_limit (int seconds)Note:Set the number of seconds that a program can run. If the time limit is reached, the program will return an error. The default limit time is 30 seconds. The value of max_execution_time is defined in the
Definition and usageThe htmlspecialchars () function converts some predefined characters into HTML objects.
The predefined characters are:• & (And number) become &• "(Double quotation marks)"• '(Single quotes)'• •> (Greater than)
Copy codeThe Code is as follows:// Start to cache ImagesOb_start (); // enable the output cache to temporarily cache the output contentImagejpeg ($ newimage, false, $ quality); // output$ Data = ob_get_contents (); // obtain the cache YOU JUST
1. Client pages use AJAX technology to request serversAdvantages:The simplest and fastest way is to embed AJAX calls in the HTML code returned to the client, or embed an img tag. src points to the time-consuming script to be
Xhprof is a php performance testing tool open-source by facebook. It can also be called the profile tool. It doesn't know how to translate it to make it more satisfactory. There are many similarities with xdebug. In the past, there were some records
Okay, so I have a few questions and don't need regular expressions. Let's see how I solve them.1. Clear all tags in HTML and only keep the hyperlink.I use strip_tags.Strip_tags ($ data, $ tags)$ Data is a string and $ tags is a reserved
1. Prevent jumping out of the web directoryFirst, modify httpd. conf. If you only allow Your php script program to operate in the web directory, you can also modify the httpd. conf file to limit the php operation path. For example, if your web
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