【发布时间】:2016-09-07 14:05:27
【问题描述】:
我使用 php 从数据库中检索图像
然后我想用html中的这张图片作为背景。
我尝试使用此代码,但它不起作用:
<div class="fill" style="background-image:url('<?php echo "<img src='getImg.php?id=$13'>"; ?>');"></div>
【问题讨论】:
-
变量
$13?从the documentation 开始,有效的变量名称以字母或下划线开头,后跟任意数量的字母、数字或下划线。