Author:HaohappyMSN: haohappy at msn.comBlog: http://blog.csdn.net/haohappy20042006-07-04 Why?Debugger?Many PHP programmers use echo, print_r (), var_dump (), and printf () for debugging. In fact, this is enough for programmers with rich development
Fsockopen spoofs the post and get methods. If you are looking for php processing code that spoofs the post and get methods, this is good.Copy codeThe Code is as follows:// Fsocket simulate post submission$ Purl = "http: // localhost/netphp/test2.php?
I just browsed the article about Class updated on the homepage (referring to the http://www.phpe.net/articles/389.shtml of PHPE), very good, it is recommended to have a look.Exploration of classes ~~ It took me half a year to understand the role and
Input and OutputInput and output are the basic functions of many websites. User input data, website output data for others to browse.Take the popular Blog as an example. The input and output here is the Blog article page generated by the author
In the past, when I used dede for collection, I could not filter out more than one line of code, but only one row of Code. On the Internet, I found many cainiao like me. With the continuous use of dede collection, I have a better understanding of
Add it to head.htm, that is, add "$ stime = microtime (true); // get the start time of the program" to the default template"Copy codeThe Code is as follows:$ Stime = microtime (true); // gets the time when the program starts to run.$ GuideFid [$ fid]
$ 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
I have done a lot of products that crawl content from other websites and get used to using the convenient and fast file_get_contents function. However, I always encounter the problem of failed access, even though I set the timeout according to the
In many cases, in order to display the timeliness of information, the time is usually displayed as "just", "5 minutes ago", "3 hours ago", and so on, instead of printing the time directly. For Weibo, SNS applications use this function for the
Reference1. You can download the stracecommand of linux.txt from Sina.2man straceA general and complete usage:Strace-o output.txt-T-tt-e trace = all-p 28979The preceding description is used to track all system calls of the 28979 process (in the-e
I. php running mode in apache Php is common in apache.Three working modes: CGI Mode, FastCGI mode, and Apache module DLLComparison:1. Comparison between CGI Mode and module mode:Difference between the two working methods of php in apache (CGI Mode
We first give two ArraysCopy codeThe Code is as follows:$ R = array (1, 2, 3, 4, 5, 6 );$ E = array (7,8, 9, 10 );?>Here we use the array_merge and the plus sign to add these two arrays.Copy codeThe Code is as follows:Print_r ($ r + e); // output
1. If the class method can be defined as static, it should be defined as static as much as possible, and its speed will be increased by nearly four times.2. $ row ['id'] is 7 times faster than $ row [id.3. echo is faster than print, and multiple
I. 10 sentences1. do not rely ON the register_global = ON environment. From the day when you have just learned how to configure the php runtime environment and even do not understand the impact of register_global ON/off on yourself, we should be
[Code] User Information summary ######################################## ################################ Connect to a database ######################################################## #####################$ Db = mysql_connect ("192.168.0.2", "root",
As we all know, dedecms supports [field: senddate function = "strftime ('% y-% m-% d % H: % m', @ me) "/] in this way, you can use the function in the tag to call the relevant function to re-process the content returned by the current tag and then
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