echo "<img src=".$file." >" ; doesn't display image [closed]
echo "<img src=".$file." >" ;
does not display image, while $file points to the correct image location C:\wamp\www\formulae\public\images\13.png
开发者_如何学Gopart of code reads as follows
$file = LIBPATH.DS.'images'.DS.$id.'.png' ;
if(file_exists($file)){
echo $file."</br>";
echo "<img src='".$file."' >" ;
}
<img src="<?php echo file_dir . '/' . $imageone; ?>" height="100" width="100"/>
would help you
Try this
echo '<img src="'.$file.'">';
You should use paths relative to your Apache document root and not absolute to your file system.
精彩评论