Fix Warning:cannot Modify header information-headers already sent by ...
Information often prompts: Cannot modify header information-headers already sent by (...). In fact, has achieved the desired effect, is this error message look uncomfortable,
In the current PHP version of the default configuration, "Output buffering" is opened. The old version is not so, in the old version of PHP, the string at each time the output (through the Echo or print function), will trigger a send to the client
The output buffer handler function is a bit like the C stack, which is temporarily placed in a storage space to process the content.
The output buffer functions are:
Ob_start ()- open output control buffer
Ob_get_length ()-Returns the
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
During the conversion of the wishing board encoding last night, a page needs to declare the UTF-8 encoding in the head.ProgramA header in. Google: Find several solutions:
If you got this message: "Warning: cannot modify header information-headers
How to improve PHP running speed? To improve the speed of PHP operation?
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
50 high-quality PHP code practical tips, I hope you like it.
1. Do not use relative pathsOften you will see:
Require_once ('.. /.. /lib/some_class.php ');
This approach has many drawbacks: it first finds the specified PHP include path, and then
Refresh the PHP buffer to accelerate your site and refresh the php buffer site. Refresh the PHP buffer to accelerate your site. refresh the php buffer site. under the default configuration of the current PHP version, "OutputBuffering" is enabled.
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
1. Do not use relative paths
Often you will see:
Require_once ('.. /.. /lib/some_class.php ');
There are many drawbacks to this approach:
It first looks for the specified PHP include path and then finds the current directory.
Therefore, too
Display_errors
This instruction controls whether PHP outputs errors, notices, warnings. Normally open in development mode and off in product mode.
A bit of a pit is, php.ini, the file at the beginning of the introduction of the
This file must be named ' php.ini ' and placed in the directory specified by the PHPINIDIR directive in httpd.conf.The latest version of PHP.ini can be viewed in the following two
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 burdenThe basic principle of OB: If the OB cache is open, then
One of the most common errors on the Web is the invalid link. Once an invalid link appears from another site, you will reschedule yourof the site. People will store their favorite sites in a book, if they visit again after three months, only to find
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 we can process and output
PHP.ini Chinese Configuration Instructions
;;;;;;;;;;;
; Warning
;;;;;;;;;;;
; This profile is the default setting for newly installed PHP.
; By default, PHP uses this configuration file to install
; This configuration is for development
Errors | error handling using PHP error handling
One of the common errors on the Web is an invalid link. Once an invalid link appears from another site, you will rearrange your
's site. People will save their favorite sites in a book, and if they
Generally you do not need to change the PHP settings, it usually works well according to the default configuration. But developers as PHP designers consider that users may occasionally need to tweak some of the functionality of the PHP language for
Data integrity DiscussionsWe have chosen the I/O multiplexing model as the system underlying I/O model. However, we do not specifically address the read and write problem, that is, in our reactor mode, how we read and write operations to ensure that
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.