Re: Re: deleting a file in another directory

From: Date: Thu, 22 May 2003 10:58:04 +0000
Subject: Re: Re: deleting a file in another directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148531@lists.php.net to get a copy of this message
On Thursday 22 May 2003 18:30, mailing wrote: > Sure... > The script (del_appro.php) is called from a link as: > del_appro.php?imageid=12 which is in the sites root directory. The mysql > data is getting deleted if I remove the unlink part that is causing me > problems. The images that it need to delete are in /appro_image and are > named $filename. > >> I am trying to write a script to delete an image file in a directory > >> under the script directory but I get this error : > >> > >> Warning: Unlink failed (Is a directory) in (my directory path to script) The warning says "(Is a directory)", and you're trying to do unlink("./appro_image/$filename"); So echo "./appro_image/$filename"; and I think you'll find that $filename is empty. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* I have hardly ever known a mathematician who was capable of reasoning. -- Plato */

« previous php.general (#148531) next »