添加html<;a>;标记


Adding html <a> tag in php

有没有办法在php脚本中添加html <a>代码,如下所示:

<div id="flashDiv" align="center" style="position:absolute; top:20%; left:30%; z-index:51;">
<?php if ($OS == Windows): ?>
<a target="_blank" href="http://localhost/file.exe">
    <img src="http://localhost/flower.png"></img>
</a>
</div>
<?php else: ?>
nothing

您需要使用正确的语法:p

<div id="flashDiv" align="center" style="position:absolute; top:20%; left:30%; z-index:51;">
<?php if ($OS == "Windows"): ?>
<a target="_blank" href="http://localhost/file.exe">
    <img src="http://localhost/flower.png">
</a>
</div>
<?php endif; ?>