serve image through PHP
-
I’m trying to serve some hidden images (not in public_html folder) using a php file. For some reason I’m getting a broken link image and I really don’t know what I’m doing wrong. (it might be something really stupid).
For simplicity purpose, I’m storing the image file in the same level as the other files (as it still gives me a broken link).
I’m storing the php file in the root and calling it on my php page using
<img src="LoadImg.php"/>Then, the LoadImg.php is very simple:
<?php header("Content-type: image/jpeg"); $img='image.jpg'; readfile($img); ?>I’m getting a 404 when the browser looks for http://siodental.com/LoadImg.php
So I’m guessing it might have to do with the .htaccess or some default configuration that WordPress does.Thank you!
The topic ‘serve image through PHP’ is closed to new replies.