Forum Moderators: coopster & phranque

Message Too Old, No Replies

Opera only displays HTML but doesn't execute

Perl newbie

         

cupojava1

12:27 am on Feb 26, 2006 (gmt 0)



What would cause Opera to only display the HTML code created by a Perl Script but not actually execute it?

DrDoc

6:51 am on Feb 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the content-type header is sent as text/plain and not text/html ...

Matt Probert

8:38 am on Feb 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure your Perl script prints the appropriate header. I always use a fairly standard bit of reusable code within the Perl script:

print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";

That first line is critical. And don't forget the two carriage-returns at the end of it!

Matt