Hey guys.. long time no see (vacation was fun ) anyway...
I'm writing a file to update a thumbnail in a database.
The problem i am having is that the script will not delete (unlink) the old thumbnail image.
I keep getting this error:
I know, I know.. the permissions aren't set properly.. HOWEVER my script is supposed to set the permissions of first the directory, and THEN the file to 777. Then delete the file and reset the directories permission to 755.
An error occurred in script '/home1/birdwing/public_html/admin/portfolio/upload.php' on line 117: unlink() [<a href='function.unlink'>function.unlink</a>]: http does not allow unlinking
here is the code:
$t: is the name of the file
// delete old entry
chmod("../../images/portfolio/$a_id" . $t,0777);
unlink("http://www.birdwingfx.com/images/portfolio/$a_id" . $t);
and $a_id: is the directory it's in (a number)
the first line outputs: ../../images/portfolio/1/
the second line outputs: ../../images/portfolio/1/thumb_2.gif
the last line outputs: ../../images/portfolio/1/
so i know my variables are correct...
what could be the problem?