Brett wrote:
> the thumbnail images now have _tmb inserted between
> the file name and the extension. So when deleting I keep getting
> warnings that the file mypic001.jpg cannot be found in the thumbs
> directory. How do I get the _tmb into the file name?
foreach ($_POST['images'] as $image) {
unlink($mainImgDir . $image);
$pos = strrpos($image, '.');
$thumb = substr($image, 0, $pos) . '_tmb' . substr($image, $pos);
unlink($thumbsDir . $thumb);
}
> By the way, you used unset() where I think you meant unlink().
Yes, I did. Sorry about that.
> Finally, I have discovered that if I upload a file named Ti301.JPG, I
> get Ti301.JPG001_thb.jpg. It seems that the strtolower() function in
> getNextFilename5.php is not converting the uppercase extension, it is
> just adding the incremented number plus _tmb and the new extension. Any
> ideas about how to correct that?
That shouldn't be happening, but I don't have time to look into that
now. Sorry.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/