1. Do not use relative pathsFor exampleRequire_once ('.. /.. /lib/some_class.php ');There are many drawbacks to this approach:1) It first finds the specified PHP include path and then finds the current directory2) If the script is included in a
When I output XML using PHP today, I used the Header () function and also needed to echo a variable, which produced a conflict. Google, find several solutions, translate: Ifyougotthismessage: Warning: Cannotmodifyheaderinformation
When I output XML
In the Yii2.0 framework source code, yiisoftyii2baseView. php shows a function that introduces the php file. Why use ob_start, ob_get_clean? What is the difference from direct file introduction? {Code ...} you can also enter {code...} directly ...}
Because the extension is used by third-party developers, some extra efforts are required to create it. Below are some general guiding principles: * expansion should be self-contained. That is to say, its external dependencies should be the least. If
OB, output buffer, is the abbreviation for the output buffering, not the output cache. OB is used to be able to help speed, but blind plus OB function, will only increase the CPU extra burden
The basic principle of OB: If the OB cache is open, then
The content of this section1.PHP Introduction2. First PHP script3.PHP Language Tags4. Instruction Separator5. Program Notes6. Handling of whitespace characters in a program7. Variables8. Types of variables9. Conversion of data types to each other10.
Buffer
Buffer is a memory address space, the Linux system default size is generally 4096 (4KB), that is, a memory page. It is primarily used to store data between devices that are out of sync or between devices with different priority levels. By
Solve the PHPheadersalreadysent error this article is the answer to a question on stackoverflow. The answer focuses on the ideas of other answers and summarizes them, in the future, if you encounter a "headers already sent" error, you can directly
In PHP programming, we often encounter some functions that produce output directly, such as PassThru (), ReadFile (), Var_dump (), and so on. But sometimes we want to import the output of these functions into a file, or go through processing and
Caching in ZendFramework is performed by the front-end, and through the backend adapter (File, Sqlite, Memcache ...) And a flexible IDs and Tags system (identifier and tag system) to store cache records. module (Zend_Cache_Core)
1. fast Zend_Cache
[PHP] to improve the speed of PHP some tips to share
One of the biggest advantages of using PHP is that it's fast. In general, PHP always has enough speed to support the dynamic generation of Web content, and many times it is not even possible to
FirePHP use instance + comment 1. what is firePHP? firePHP is a ff plug-in for outputting php debugging information to the firebug console. II. what does firePHP do after it is officially released without affecting the page display? Debug php and
After the above two methods, I believe that the performance of your php (as the current mainstream development language) application has been greatly improved. now we should consider the following from another aspect: download speed. If your
Use
PHPOne of the biggest advantages is fast. In general, PHP always has enough speed to support the dynamic generation of Web content, and many times it is not even possible to find a faster method. However, when faced with massive traffic,
This article mainly introduces the PHP method of using the cached instant output content (outputbuffering). The example analyzes the usage skills of php Cache output, which has some reference value, for more information about how to use PHP to cache
One of the biggest advantages of using PHP is that it's fast. In general, PHP always has enough speed to support the dynamic generation of Web content, and many times it is not even possible to find a faster method. However, when faced with massive
One of the most common errors on the Web is the invalid link. Once an invalid link appears from another site, you will reschedule your
of the site. People will store their favorite sites in a book, if they visit again after three months, only to
How to improve PHP running speed?
One of the biggest advantages of using PHP is that it's fast. In general, PHP always has enough speed to support the dynamic generation of Web content, and many times it is not even possible to find a faster method.
From: http://zhanglulu33.blog.163.com/blog/static/112799542010112810497281/
If you got this message: "Warning: cannot modify header information-headers already sent ...."If you see this warning when executing the PHP program: "Warning: cannot modify
Recently, my work involves headers and HTTP protocol. I read the PHP manual again (it is definitely a good thing). I have learned something better and noted it down first, it may also be added:
Manual introduction:
HeaderSend an original HTTP header
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.