Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include Perl script in an HTML page.

Status
Not open for further replies.

cosports

Programmer
Dec 16, 2000
9
US
I cant for the life of me figure out why this does not work.

I have an HTML page with the following statments and neither work.

<!--#exec cgi=&quot;/cgi-bin/banman.pl?tourist&quot;-->

<p>

<!--#include virtual=&quot;cgi-bin/banman.pl?tourist&quot;-->

My script &quot;banman.pl&quot; runs fine if I call it from the
browser. the script itself retrieves data from a MySql DB
and displays a banner with a URL. I set the permissions for
each file to 777 just for the heck of it and that doesnt work either. Any suggestions? Thank you very much. Eric
 
Have you changed your HTML file extension from .html to .shtml? Are you sure your web server support Server Side Includes (.shtml)?

Tim --
Tim <tim@planetedge.co.uk>
 
How about this:
Code:
<img src=&quot;/cgi-bin/banman.pl?tourist&quot;>
Be sure the first thing banman.pl does is print the correct content type header for an image, for example:
Code:
print &quot;Content-type: image/gif\n\n&quot;;
Then banman.pl should just print the image file.
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
thanks a ton. you guys rule. i haven't had a chance to
try it, but i bet its the Content-type tag.
the server i'm running on is down. I am using the shtml suffix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top