Wild Card with unlink
| From: | Vernon | Date: | Wed, 28 May 2003 00:44:18 +0000 |
| Subject: | Wild Card with unlink | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149178@lists.php.net to get a copy of this message | ||
I'm trying to delete two files in on fell shoop. One is defined with $file2
// returns "filename without extension"
$filename_small = substr($file1, 8, 10);
// returns define location and file name to delete
$file2 =
"/home/httpd/vhosts/servername/httpdocs/photoalbum/$filename_small";
// the other file name has _small appended to it with it's owen extension
(png, jpg, gif, etc.)
// I thought it would be this but it doesn't work
unlink("$file2"."_small.*");
Thanks