I feeling like a fool for asking this question, but I've got an unlink() command in a php script on IIS that gives me a "Permission Denied" error. Obviously, I have checked that the file is read/write, and that the containing folder is also read/write. The original file was created by an upload script. I can create files, and I can even overwrite them - but I can't delete (unlink)! I usually work with Apache/Linux, so maybe I'm missing something really obvious. Oh, and I've tried replacing all forward slashes with backslashes... no effect.
Just for completeness, here's my code:
PHP Code:
// $bulletins_directory is set earlier to the correct container directory
$temp = basename($_GET['delete']);
$full_filename = realpath($bulletins_directory . $temp);
if ( file_exists( $full_filename ) ) {
$delete_worked = unlink( $full_filename );
}
Can anyone help?
Last edited by dcs3jah; 11-04-2004 at 12:03 PM..
|