Hi there..
maybe you can help me, well I hope so...
I have this code:
if($deleteimg1=='yes')
{
$final_filename1='1-001.jpg';
$delfile="../images/aanbod/".$final_filename1;
unlink('$delfile');
$final_filename1='';
}
The error I get is:
Warning: Unlink failed (No such file or directory) in /home/projecten/www/mathe/versie_2/aanbod/admin/edit.php on line 109
Strange 'cause I know the file exists. I can see it at the moment....
I can 'remove' my filename from the DB, thats no problem. I use the ''
But I can't remove files from the directory... I tried to find the answer on several Script site's like Hotscript, but I'm stuck here...
I saw this piece of code, and I tried, there is no error, but the file isn't deleted.
$file=basename($file);
if (is_dir($file))
$res=@rmdir ($file);
else
$res=@unlink($file);
Can you help me? Hope so!!!!!
Thnx,
xfinx,
Bjorn