文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>perl-cgi中无法显示img标记图片的解决方法

perl-cgi中无法显示img标记图片的解决方法

时间:2009-08-25  来源:shihao138096

A: My Perl CGI script generates HTM file with <img src="images/image.jpg" alt="site_image" width="800" height="200"> [download] My perl file is in cgi-bin directory and everything works fine except oppening img.
When I create HTML file from the view/source in my IE6 it works fine (image is shown).
Any idea what may be wrong?
B: webservers are not usually configured to render images in a CGI/executable mapped directory. The only thing that happens to files residing in these trees is that they are executed (ie. scripts etc.) Images and HTML docs should never reside in this tree.

Images, HTML documents, etc., should reside in the non-executable side of the webserver which is mapped so that the content is merely displayed (and *NOT* executed). This tree is usually named "htdocs" (in the Unix world, in MS-IIS it's named something else).

If you view the files statically (ie. via your filesystem), the configured limitations of the webserver mappings are not imposed, thus you can view the image successfully.

相关阅读 更多 +
排行榜 更多 +
打螺丝高手

打螺丝高手

模拟经营 下载
解救火柴人计划安卓版

解救火柴人计划安卓版

体育竞技 下载
鸡生化精英安卓版

鸡生化精英安卓版

飞行射击 下载