I looked up the definition for unlink() and of course it deletes files. But im a little bit confused. you can put the file name into the parameter but how does it know what directory to find the file so it can delete it ??
ok, i found out that rmdir() is alot better. but still whats the difference in the two. Can I only use 1 ??
delete files like this
rmdir("C:/www/apache/htdocs/2players.jpg")
or like this
$delete = "C:/www/apache/htdocs/2players.jpg";
rmdir($delete);
numerical25 wrote:ok, i found out that rmdir() is alot better.
ok, i found out that rmdir() is alot better.
Uh... what?
If you'll read the manual, you'll find that [man]rmdir/man is used to remove directories. [man]unlink/man is used to delete files.
numerical25 wrote:how does it know what directory to find the file so it can delete it ??
how does it know what directory to find the file so it can delete it ??
Er... it looks at everything before the filename, just like you would.