html - output image in php page -
thank hard work, issue not complicated. i'm trying display few images in website, , won't display, php page , image on same directory, , when try same directory on html file works fine, when try use same directory on php file pic broken icon,and won't appear.. tried png , jpg image, still nothing coming out..
please guys..
this simple code, tried test,
<html> <head><title> hello </title></head> <body> <?php $image = 'zz.png'; ?> <img src= "<?php $image ?>" style="width:304px;height:228px;"> hello world.. </body> </html>
print var $image
echo (and close image tag frontslash @ end of tag correct html):
<img src= "<?php echo $image; ?>" style="width:304px;height:228px;" />
other possible reasons image not displayed (after print image name out echo
):
- the value of var
$image
mismatched imagename. - the image not stored in same folder php document.
- your image saved in
cmyk
mode, , not inrgb
. - the file permission of image
- configuration of webserver (apache ex.)
Comments
Post a Comment