Is there any way to add an html <a>
code in a php script like here:
<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
答案 0 :(得分:1)
您需要使用正确的语法: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; ?>