First of all, I’m sorry for my bad English.
I prepared a florist script with PHP. I save the images in the images folder in the management panel and fetch the images as follows:
<img src="<?= $admin_url; ?>images/products/image.jpg">
When I did it this way, I kept getting the following error: Cross-Origin Read Blocking.
Ben de şöyle değiştirdim:
<img src="<?php echo $admin_url; ?>images/products/image.jpg">
Actually, I thought the problem was solved because I could see the pictures and the site was working. After a while it started giving the same error again. So this time I changed it like this:
<img src="https://adminpanel.com/images/products/image.jpg">
This time, like the previous one, it got better for a while, then it broke down again and now it’s like this and it’s not working either. As I said, it gives CORB error and I cannot see the images I uploaded to my site.
In short, I couldn’t fix it no matter what I did and this situation was really starting to bother me. Can you help me, please?
The exact code I’m trying to take pictures of is now as follows:
$getProducts = getProductsIndex();
foreach($getProducts as $a) {
$product_id = $a['id'];
$getImageQuery = $db -> query("SELECT * FROM product_imgs WHERE product = '$product_id' ORDER BY id DESC LIMIT 1");
$getImage = $getImageQuery -> fetch();
echo '<div class="shop-item col-lg-4 col-md-4 col-sm-12">
<div class="inner-box">
<div class="image">
<a href="urun?value=' . encrypt($product_id) . '" style="display: inline-block; width: 305px; height: 285px;"><img src="https://admin.seydisehircicekci.com/images/products/' . $getImage['img'] . '" alt="Ürün Görseli" style="width: 100%; height: 100%;" /></a>
</div>
<div class="lower-content">
<h6><a href="urun?value=' . encrypt($product_id) . '">' . $a['name'] . '</a></h6>
<div class="d-flex justify-content-between align-items-center">
<div class="price">₺ ' . $a['price'] . '</div>
</div>
</div>
</div>
</div>';
}
Thanks in advance to everyone who helps!
I was trying to fetch images from the admin panel to my website but I encountered the CORB error many times and could not fetch in the images.