当前位置:   article > 正文

Can't find string terminator " " anywhere before EOF

can't find string terminator "endofinput" anywhere before eof at ptest.pl li

在设置好IIS后,写下第一个CGI程序:

#! D:\Perl\bin\perl -w

print "Content-type: text/html\n\n";
print <<END_OF_HTML;
<HTML>
<HEAD>
<TITLE>About this server</TITLE>
</HEAD>
<BODY>
Servername:
</BODY>
</HTML>
END_OF_HTML

 

这时候,键入http://localhost/cgi/first.cgi却总是显示下列错误:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Can't find string terminator "END_OF_HTML" anywhere before EOF at ~\cgi\first.cgi line ~.

 

解决方法:最后一行的END_OF_MAIL后面加上一个换行符,因为Perl总是匹配\nEOF\n


#WTF....

转载于:https://www.cnblogs.com/danielrocks/p/3248914.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/1019456
推荐阅读
相关标签
  

闽ICP备14008679号