Hello everyone.
I'm having some problems with the unlink() command.
Let's say im in the directory develop/stuff/members. If I refer to the file being /www/files/stuff/photos/user-1.jpg, I get the error: Warning: Unlink failed (No such file or directory)
And yet, the file is there.
I tried using:
../../../www/files/stuff/photos/user-1.jpg
and the actual location name (http://whatever.com/photos/user-1.jpg)
Those didn't work either.
Here's a chunk of the code I'm using:
$nick = strtolower($nick);
$photo_file = "/www/files/stuff/photos/$nick-$num.jpg";
$thumb_file = "/www/files/stuff/thumbs/$nick-$num.jpg";
if (unlink($thumb_file))
{
echo "<br>Thumbnail deleted successfully.<br>\n";
}
else
{
echo "<br>Thumb deletion failed.<br>\n";
}
if (unlink($photo_file))
{
echo "<br>Photo deleted successfully.<br>\n";
}
else
{
echo "<br>Photo deletion failed.<br>\n";
}
Please let me know where I'm messin up...
Thanks for any help you can provide.
-=John=-