deleting files
Posted: Thu Nov 30, 2006 12:22 pm
i've read up on deleting files, and it seems that unlink($filename), where $filename is just a string containing the file url, is what i must use.
but i've also read that unlink merely unlinks the file from its directory, thus it isn't actually removed, but only forgotten about.
now if my hosting provider charges me per megabyte of storage used, and i unlink a 50mb file, is it deleted or merely just forgotten about?
when i do a directory listing (using glob() for example) the file is no longer there, but i want to be sure that it's not taking up space (and hence costing me money) either.
can someone please confirm this or perhaps explain how files are to be properly removed in php?
thanks
but i've also read that unlink merely unlinks the file from its directory, thus it isn't actually removed, but only forgotten about.
now if my hosting provider charges me per megabyte of storage used, and i unlink a 50mb file, is it deleted or merely just forgotten about?
when i do a directory listing (using glob() for example) the file is no longer there, but i want to be sure that it's not taking up space (and hence costing me money) either.
can someone please confirm this or perhaps explain how files are to be properly removed in php?
thanks