调用图像标记中的perl脚本不会执行 [英] Call to perl script in image tag does not execute

查看:67
本文介绍了调用图像标记中的perl脚本不会执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有两个pl文件:realtimechart.pl和realtimedemo.pl

realtimechart生成一个实时图形图像文件(png,gif,jpeg等)

和realtimedemo一起生成一个html文件以及realtimechart生成的图形,并使用图像id刷新它。但不知何故,它没有采用realtimechart.pl生成的图表。本声明中存在一些问题


< img id =" ChartImage1" src =" realtimechart.pl?chartId = demoChart1">


因为它不是执行realtimechart.pl而是将所有内容都视为不可执行的语句


请快速帮我解决这个问题

解决方案

这只是一些调用脚本的html代码:


< img id =" ChartImage1" src =" realtimechart.pl?chartId = demoChart1">


我不确定你的意思是:它将所有内容视为非可执行语句。

它没有执行realtimechart.pl并在src =之后处理所有内容仅作为文件位置


@ parashar123


查看 img标签可用的选项,src绝对是其中之一,但如果你阅读了说明在该链接中的src,它应该是要显示的图像的URL。我个人不知道是否将带有选项的Perl脚本放入其中会实际返回要显示的图像。


脚本可能必须是cgi,因为预期的是URL,所以你可能想要格式化src如下:

展开 | 选择 | Wrap | 行号


There are two pl files: realtimechart.pl and realtimedemo.pl
realtimechart generates a realtime graph which would an image file(png,gif,jpeg etc)
and realtimedemo generates a html file alongwith the graph produced by realtimechart and also refreshes it using the image id. But somehow it is not taking the chart generated from realtimechart.pl. There is some problem in this statement

<img id="ChartImage1" src= "realtimechart.pl?chartId=demoChart1">

because instead of executing realtimechart.pl, it treats everything as non-executable statements

Please help me out with this quickly

解决方案

this is just some html code that calls the script:

<img id="ChartImage1" src= "realtimechart.pl?chartId=demoChart1">

I am not sure what you mean by: "it treats everything as non-executable statements".


it is not executing realtimechart.pl and treating everything after "src = " as just a file location


@parashar123
Looking at the options available to the img tag, src is definitely one of them, but if you read the description of src in that link, it is supposed to be the url of the image to display. I personally don''t know if putting a Perl script with its options into their would actually return an image to be displayed.

The script would probably have to be cgi since what is expected is a URL, so you may want to format the src as follows:

Expand|Select|Wrap|Line Numbers


这篇关于调用图像标记中的perl脚本不会执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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