CodeIgniter warning: Cannotmodifyheaderinformation please help
Source: Internet
Author: User
CodeIgniter warning: Cannotmodifyheaderinformation Please help you enter this code in the controller & nbsp; classMyfile1extendsCI_Controller & nbsp; {& nbsp CodeIgniter warning: Cannot modify header information Please help
Enter this code in the controller.
Then the running result can be correctly output $ str, but $ str is output and then displayed.
A php Error was encountered
Severity: Warning
Message: Cannot modify header information-headers already sent by (output started at E: \ AppServ \ www \ ci \ application \ controllers \ myfile1.php: 12)
Filename: core/Common. php
Line Number: 442
404 Page Not Found
The page you requested was not found.
I don't know why. please give me some advice !!!
------ Solution --------------------
We recommend that you install xdebug for php to output all tracing information for an error, and then you will know how the header output is called.
------ Solution --------------------
The program has already told you the problem.
Headers already sent by (output started at E: \ AppServ \ www \ ci \ application \ controllers \ myfile1.php: 12)
It indicates that an error occurred in E: \ AppServ \ www \ ci \ application \ controllers \ myfile1.php 12th.
There is content output before the header Because there is absolutely no content output before the header, so your current situation occurs. look at your own code, where there should be echo; print and other things output content.
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.