php - Can't get to link so image using constants -
why can find image when use ?
defined("prod_images") ? null : define("prod_images", realpath(dirname(__dir__) . "/public/images/")); $product_image = prod_images . $image; <img src="<?php echo prod_images; ?>" alt="">
please try:
absolute path:
<img src="http://www.yourdomain.com/images/<?php echo $image; ?>" alt="">
or relative website root:
<img src="/images/<?php echo $image; ?>" alt="">
Comments
Post a Comment