CGI脚本 - 修改图像处理程序以包含超链接 [英] CGI Script - Modify image handler to include hyperlink

查看:110
本文介绍了CGI脚本 - 修改图像处理程序以包含超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有人为我编写了一个小的perl脚本,它使用日期和时间来确定要显示的两个图像中的哪一个(open.gif或closed.gif)。我需要修改脚本以包含指向open.html或closed.html的超链接,这样如果显示打开的图像,则会在图像上放置open.html链接,并在关闭的图像上放置closed.html链接。加载图像的相应网页是超基本的,带有.pl脚本的链接作为图像标记。


任何人都可以帮助一个真正的perl新手(我!)一个?


谢谢大家!

Hi,

Someone put together a small perl script for me that uses day and time to determine which of two images to display (open.gif or closed.gif). I need to modify the script to also include a hyperlink to open.html or closed.html so that if the open image is displayed it puts the open.html link on the image and the closed.html link on the closed image. The corresponding web page that loads the image is ultra basic, with a link to the .pl script as the image tag.

Can anyone help a real perl novice (me!) with this one?

Thanks guys!


展开 | 选择 | 换行 | 行号

推荐答案

你想要什么是不可能的。


这个脚本是一个根据当前时间提供图像的处理程序。此脚本旨在在图像标记的src值内引用。没有办法影响引用此图像的封闭html。处理器。


- 米勒
What you want is not possible.

This script is a handler that serves an image depending on the current time. This script is intended to be referenced inside the src value of an image tag. There is no way to effect the enclosing html that refers to this "image" handler.

- Miller


嗯...这是否意味着以不同方式编写的全新脚本可以完成工作或者CGI脚本根本做不到?并且......可以将SSI与脚本结合使用以实现我的需要;基于开放或封闭图像重定向的东西? CGI + javascript?


谢谢!
Hmmm... does that mean an entirely new script written in a different way can do the job or that a CGI script can''t do it at all? And... can a SSI be used in conjunction with the script to achieve what I need; something like redirecting based on the open or closed image? CGI + javascript?

Thanks!


必须在封闭的html中找到解决方案,而不是图像处理程序。我不知道是什么生成使用此图像处理程序的html,或者它只是静态html。但不管目前产生什么,如果你想要动态html,那么你将不得不对它进行编程。


- 米勒
The solution must be found in the enclosing html, not the image handler. I don''t know what is generating the html that is using this image handler, or if it''s just static html. But regardless of what is currently generating it, if you want dynamic html, then you''re going to have to program it.

- Miller


这篇关于CGI脚本 - 修改图像处理程序以包含超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆