#!C:\xampp\apache\bin\httpd.exe
$command=`perl -v`;
$title = "Perl Version";
print "Content-type: text/html\\n\\n";
print "<html><head><title>$title</title></head><body>";
print "
<h1>$title</h1>
\n";
print $command;
print "</body></html>";
過早結束我得到這個錯誤:腳本頭(Perl的)
Premature end of script headers: version.cgi
改變了這一切,但仍是同樣的錯誤! – 3zzy
請參閱編輯 – mrk
下的文本嚴格來說,應該是'Content-type:text/html \ r \ n \ r \ n' – mrk