I have a global variable set on a PHP site that establishes a path to the image directory.
<?
// Global Image Directory Path
$img_root = "/test/images";
?>
Why is it when I reference this image path to display my images...
<IMG SRC="<? echo "$img_root/myimage.jpg" ?>" ALT="My Image" BORDER="0">
...that often 1 or 2 of them appear to be broken. And they randomly change if you refresh the page. If they are broken, in IE you can right click on them and choose "Show Image" and the image will then appear. So the path is correct, but somehow it's not showing it.
Is there a trick to avoid this or is there something I'm doing wrong? I don't have this same problem when I use dynamic image paths in ColdFusion or ASP, so I know it has something to do with PHP and not the browser or server.
<?
// Global Image Directory Path
$img_root = "/test/images";
?>
Why is it when I reference this image path to display my images...
<IMG SRC="<? echo "$img_root/myimage.jpg" ?>" ALT="My Image" BORDER="0">
...that often 1 or 2 of them appear to be broken. And they randomly change if you refresh the page. If they are broken, in IE you can right click on them and choose "Show Image" and the image will then appear. So the path is correct, but somehow it's not showing it.
Is there a trick to avoid this or is there something I'm doing wrong? I don't have this same problem when I use dynamic image paths in ColdFusion or ASP, so I know it has something to do with PHP and not the browser or server.