Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个存储用户图像路径的数据库,例如 images/profile/950baasfaa88c.jpg。现在,当我尝试将它放入一个变量并用图像标签包围它时,只会出现一个空白图像而不是图像本身......
$profile_picture = $row['profile_image']; <img src="'.$profile_picture.'" width=50 height=50 />
你还没有回显 PHP
<img src="'.$profile_picture.'" width=50 height=50 />
应该
<img src="<?= $profile_picture ?>" width=50 height=50 />
你需要回显值
<img src="<?php echo $row['profile_image']; ?>" width=50 height=50 />