Re: How to determine if file is writable and deletable

From: Date: Wed, 07 May 2008 17:00:40 +0000
Subject: Re: How to determine if file is writable and deletable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-273993@lists.php.net to get a copy of this message
On 07/05/2008, Al <news@ridersite.org> wrote: > I need to determine if a file is truly deletable by a php script, Deleting > permissions seem to be > the same as writing, they probably have the same criteria. You're not writing to the file, you're unlinking it from the containing directory, so it's the directory's permissions that matter, not the file's. All you really need to do is check that the directory is_writable() is_writable(dirname($filename)); -robin

« previous php.general (#273993) next »