Please help - I'm bewildered and have to have this done by today.
All my code seemd to be right...
I have triple checked that I'm referring to the correct path, but I still get the unlink failed error.
The file it's trying to delete does exist, and in my test code, im referring to all the correct data.
I have also made sure that read/write permissions are set accordingly.
I have no idea why this doesn't werk.
Here's the simplified code - it still recieves errors:
<?
$REMOTE_USER = "poopiehd";
$num = "3";
$photo_file = "$REMOTE_USER-$num.jpg";
$thumb_file = "$REMOTE_USER-$num.jpg";
if(chdir("/www/files/personals/thumbs")){
echo "Change of directories to /www/files/personals/thumbs successfull.<br>\n";
if (unlink($thumb_file) != FALSE)
{
echo "<br>Thumbnail deleted successfully.<br>\n";
}
else
{
echo "<br>Thumb deletion failed.<br>\n";
}
}
else {
echo "Change of directorie to /www/files/personals/photos failed.<br>\n";
}
chdir("/www/files/personals/thumbs");
if(chdir("/www/files/personals/photos")){
echo "Change of directories to /www/files/personals/thumbs successfull.<br>\n";
if (unlink($photo_file))
{
echo "<br>Photo deleted successfully.<br>\n";
}
else
{
echo "<br>Photo deletion failed.<br>\n";
}
}
else {
echo "Change of directorie to /www/files/personals/photos failed.<br>\n";
}
echo "<center>Photo File: $photo_file</center>\n";
echo "<center>Thumb File: $thumb_file</center>\n";
?>
Please help - I cant figure out why this isnt werking
Thanks in advance
-john-