If $basePicture = "../pictures/2008 west coast trip/2008-06-10 first week at
Chris'/DSC_0011.jpg"
and the file actually is "../pictures/2008 west coast trip/2008-06-10 first
week at Chris'/DSC_0011.JPG"
(uppercase extension) the following snippet of code
----------------------------------------------------------------------------
-----------------------
/* make sure the picture file actually exists */
if(!file_Exists($basePicture))
{
echo "file = '" . $basePicture . "' doesn't exist.<br>\n";
$extStartsAt = strrpos($basePicture, ".") + 1;
$extOfBasePicture = substr($basePicture, $extStartsAt);
$basePicture =
substr_replace($extOfBasePicture,strtoupper($extOfBasePicture),$extStartsAt)
;
}
else
{
echo "file = \"" . $basePicture . "\" exists.<br>\n";
}
----------------------------------------------------------------------------
-----------------------
generates
----------------------------------------------------------------------------
-----------------------
file = "../pictures/2008 west coast trip/2008-06-10 first week at
Chris'/DSC_0011.jpg" exists.
----------------------------------------------------------------------------
-----------------------
The script is running on an UBUNTU v8.04 LAMP server. Case is supposed to
matter, isn't it?
Thanks,
Stan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php