我不确定为什么链接的文本在页面上不可见,但是,当我将鼠标移到期望链接文本的区域时,我可以单击该链接 空白区域”,并能够下载正确的文件!
这是代码结构:
<html>
<head>
some heading/styling link etc.
<body>
some code related to creating dropdown and populating it (form used)
<?php
if submit button is clicked then bunch of variables are populated and
user receives an email with result file. Ideally, I would like to be able
to display a result file link inside this php code.However, I don't know
if php allows to create a hyperlink. So, I was testing to create a link
outside php code. The php code does some python query.
exec("/path/to/python script that does query $var1 $var2 $var3 2>&1",
$output)
?>
<a href="/<?php echo $output[8] ?>"Link to query result</a>
</body>
</html>
因此,“链接到查询结果”文本不可见,但存在链接。这是怎么回事?
谢谢!
答案 0 :(得分:1)
锚点的开始标记缺少'>'
更改
<a href="/<?php echo $output[8] ?>"Link to query result</a>
到
<a href="/<?php echo $output[8] ?>">Link to query result</a>