html - output image in php page -


enter image description here

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 in rgb.
  • the file permission of image
  • configuration of webserver (apache ex.)

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -