Ec (2); 1. Use as many built-in PHP functions as possible. 2. echo is faster than print. 3. Do not subscribe too many methods. Think carefully about the code you actually intend to reuse? 4. determine the maximum number of cycles before executing
In this article, I will continue my PHP journey and collect and summarize some common PHP errors found on the internet, hoping to help you. 1. small errors can make a big mistake. Have you ever encountered a major program problem caused by a small
1. Static Method as much as possible: if a method can be static, it should be declared as static. The speed can be improved by 14, or even improved by nearly three times during my testing. Of course, this test method needs to be executed more than 10
This article mainly introduces how to monitor Nginx502 errors with PHP scripts and automatically restart php-fpm. This article provides the implementation code and then puts it in cron for execution. For more information, see
This article mainly
1. When file_get_contents can be used to replace file, fopen, feof, fgets, and other methods, try to use file_get_contents, because its efficiency is much higher! Note the PHP version of file_get_contents when opening a URL file;2. Perform as few
PHP is often easy to remember. 1. Differences between echo and print: echo and print functions are basically the same (output) in PHP, but there are still slight differences between the two. No return value after echo output, but print has a return
1. character location search function:Strpos ($ str, search, [int]): searches for the first position of search in $ str starting from int;Stripos ($ str, search, [int]): the position where the string first appears in another string. This function is
Php often obfuscated with many knowledge points, such as the difference between include and require, and the knowledge points of some columns such as require_once () and include_once (). If you feel this is lacking, please refer to it.
Php often
Original address: http://www.cnblogs.com/melonblog/archive/2013/05/09/3062303.htmlOriginal soy milk fritters-melonThe sample code test environment for this article is Apmserv (PHP5.2.6) under WindowsBrieflyAs you may all know, PHP has a function
For example: localhostopenapiholidayLineQueryGetLineComment? AllianceId12 & amp; DigitalSign7aeac3d1c621c30c144f23b5a498bbda01895b70 & amp; ReqTime2013-09-0216: 23: 49.929 how to submit this address with get example: http: //
1, this is a relatively simple page, you can copy down can be used.jquery UI AutoComplete (Autocomplete)-Default features tags:2. Actual combat auto-populate data:(1) Page: $ ("#account_name"). focus (function () { var sel = $ (' #select '). Val ();
Recently in PHP to write an FTP-like WEB-FTP platform;Requires path access compatible with Linux and Windows;The process found that window and Linux use the path encoding is not the same, such as Linux seems to be Utf-8,window but GBK;PHP encoding
(1) The static method is four times faster than the normal method.(2) echo output is faster than print(3) Use the connection character instead.(4) take the maximum value before the loop, instead of taking the value in the loop.Correct Method$ Max =
1. Static as much as possible:If a method can be static, it is declared as static, and the speed can be increased by 1/4, or even increased by nearly three times during my testing.Of course, this test method needs to be executed more than 100,000
I am going to learn about php. I found that many functions are needed and can be written by myself, which is troublesome. So I found common php functions and obtained them from various major php systems, it is definitely a practical php
PHP string functions include the character location search function, the sub-character extraction function, the replacement string, the character length, the comparison character function, the array character, and the space.
String functions in PHP
This article provides a detailed analysis of common PHP5 functions. For more information, see
This article provides a detailed analysis of common PHP5 functions. For more information, see
As follows:
The Code is as follows:
The usleep ()
In php, we sometimes use the require () function to introduce multiple files in an initialization file (eg: ini. php. Eg: in ini. {code...} in php ...} then, in a script (eg: example. php), {code ...} but the problem is: In example. in php, we only..
PHP: how to prevent external malicious submission and call the ajax interface, phpajax
The ajax interface we have written on our own website. If you use it for yourself, you can define the origin domain name and determine the origin.
Note: replace
1. Find the character position function:Strpos ($str, Search,[int]): Find the first position of search in $str starting with int;Stripos ($str, search,[int]): function returns the position of the first occurrence of a string in another string. This
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.