During this time, I wrote a CGI program, which is also designed to cope with work. It is a simple program and always reports: premature end of script headers: This is a headache! I found some information on the Internet. Follow the information ---- first check the following information:
1. Make sure that your Apache contains mod_cgi or mod_perl modules.
2. The addhandler CGI-script. cgi option function must be enabled in the Apache configuration file.
3. cgi files can run only with 755 permissions.
4. The Perl module must exist. After configuration, the error persists! A headache! Later, I accidentally wrote a small program and tested it normally. So I returned the current program in segments. I still got this error. I just didn't find a problem. The header information is as follows:
# Define xml_head "Content-Type: text/XML; charset = UTF-8 \ r \ n"
|
After many experiments, I finally found the problem, and I almost fainted. I don't know much about this. In the eyes of high people, I may have made a low-level mistake and smiled!
The modification is as follows:
# Define xml_head "Content-Type: text/XML; charset = UTF-8 \ n"
|
CGI program reports premature end of script headers: