Ronald Wiplinger wrote:
I am having troubles with the function file_exists()
I tried the full path like:
if (file_exists('/srv/www/....../images/pic412.jpg') {
echo "<IMG SRC='images/pic412.jpg'>";
} else {
echo " " // picture is missing!
}
No matter if I use the full path or just images/pic412.jpg, it always
shows the picture is missing!
That could be because you're not referencing the image properly in the
<img src>
Should that be
<img src="/images/pic412.jpg">
?
How do you view the image in your browser? Take off the domain name and
that's exactly what you need to show in the image source.
ie if the right image source is:
http://domain.com/images/image.jpg
then your image source needs to be:
/images/image.jpg
The '/' at the start will make a big difference.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php