In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
The main content of this article is "how to solve php header failure". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to solve php header failure"!
Resolve:
1. Cancel the space between the location and ":" symbols.
2. You can't have any output before using header.
3. Modify php.ini to open the cache, and modify "output_buffering=0" to 409.
Problem: input before header function
Generally speaking, you cannot output html content before the header function, similar to the setcookie () and session functions, which need to add header information to the output stream. If there are statements such as echo before the execution of header (), when header () is encountered later, it will report "Warning: Cannot modify header information-headers already sent by …." Mistake. That is to say, there cannot be any words, blank lines, carriage returns, etc., before these functions, and it is best to add the exit () function after the header () function. For example, the following error is written with a blank line between two php code snippets:
/ / this should be a blank line
Reason:
When the PHP script starts execution, it can send both the http message header (header) information and the body information. The http header (from the header () or SetCookie () function) is not sent immediately; instead, it is saved to a list. This allows you to modify the title information, including the default title (such as Content-Type title). However, once the script sends any output that is not a title (for example, using a HTML or print () call), PHP must first send all the Header and then terminate the HTTPheader. Then continue to send the subject data. From this point on, any attempt to add or modify Header information is not allowed, and one of the above error messages is sent.
At this point, I believe you have a deeper understanding of "how to solve php header failure". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.