我试图使用定位标记访问上传的图像,该图像已保存在我的服务器上(位于上传文件夹中)。目标是提供像缩放功能。缩放工作正常,但图像不显示。 我想是这样的
将php代码添加到html定位标记
<?php
//$txt is the actual image name and $image is the name saved in uploads folder,$ext is the extension like .jpg or so.
$image = time().substr(str_replace(" ", "_", $txt), 5).".".$ext;
?>
在HTML
//image isn't displayed using
<a href = "<?php echo "uploads/$image" ?>"></a>
但显示如果我使用
<a href = "uploads/image.jpg"></a>.
是有办法,我可以用PHP代码中访问的图像标签?
现在工作正常..谢谢 – dhani 2013-05-11 21:41:49
嗨,我还有一个问题。我的脚本中有一些html代码,我通过echo执行。假设我想从该回声中访问uploads文件夹中的图像,我该怎么做?我试过这个; 'echo'