Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/266.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP:需要帮助传递pChart URL变量吗_Php_Html_Variables_Pchart - Fatal编程技术网

PHP:需要帮助传递pChart URL变量吗

PHP:需要帮助传递pChart URL变量吗,php,html,variables,pchart,Php,Html,Variables,Pchart,我很难将参数从html传递到php脚本中,我正在使用该脚本生成一个简单的线图。我正在尝试使用$\u GET方法检索变量 这是我的html代码 <td><img src="include/drawLinearChart.php?slope='.$xver.'&yInt='.$yver.'&chartName='.$scaleName.'" width="350" height="300" /></td> 任何帮助都将不胜感激。谢谢。所有 我找到

我很难将参数从html传递到php脚本中,我正在使用该脚本生成一个简单的线图。我正在尝试使用$\u GET方法检索变量

这是我的html代码

<td><img src="include/drawLinearChart.php?slope='.$xver.'&yInt='.$yver.'&chartName='.$scaleName.'" width="350" height="300" /></td>
任何帮助都将不胜感激。谢谢。

所有

我找到了解决办法。事情的html方面需要如下所示

<td><img src='include/drawLinearChart.php
        ?slope=<?php echo urlencode($xver); ?>
        &yInt=<?php echo urlencode($yver); ?>
        &chartName=<?php echo urlencode($scaleName); ?>'
        width="350" height="300"/>
</td>
感谢大家对以上语法的修改


-Ian

打字:
$varScaleName=&u GET[“chartName”]?您遇到了什么问题?看起来很好。。。蒂姆·威瑟斯(Tim Withers)说,这一点很有效,尽管现在它只是传递变量的名称,而不是值。例如,我的$varScaleName显示为“%$scaleName”。@shin,我不理解你的评论。drawLinearChart.php脚本输出一个.png文件,该文件通过img标记位于html中。我没有看到任何地方我会放一个链接,你能更具体一点吗?
<td><img src='include/drawLinearChart.php
        ?slope=<?php echo urlencode($xver); ?>
        &yInt=<?php echo urlencode($yver); ?>
        &chartName=<?php echo urlencode($scaleName); ?>'
        width="350" height="300"/>
</td>
"GET /projects/WebUI/include/drawLinearChart.php?slope=1&yInt=3&chartName=0-50PSIG HTTP/1.1" 200 14037