Q: I now have an HTML page code that wants to change it to a Perl program if simply add "#!.. in its first line /perl/bin/perl ", and change the file suffix name to. CGI, the error prompts" you don t have permission to access/test/index.cgi on the this server. " In other words: How do you include HTML code in Perl with a suffix named. cgi?
Answer: Sub html_html
{
print "content-type:text/html";
Print < #这里输出html
Eof
Exit
}
Q: After adding a sure enough, but the picture inside the "resource/top.gif" but can not show that the picture path is absolutely correct, such as: Resource/top.gif
A: With the relative path, it is best to do an installation file setup.cgi
In this file of yours:
Require "setup.cgi";
Then call this: Lt;img src= "$gif/top.gif" >
This line is in the setup.cgi file:
$gif = ' Http://your url/resource '; #图片的URL路径, note that single quotes rather than double quotes.
This should be possible with a relative path.