Connecting Tech Pros Worldwide Help | Site Map

How to delete a file on apache using PHP?

  #1  
Old March 25th, 2008, 11:05 PM
amit
Guest
 
Posts: n/a

Hi everybody,

I'm trying to remove a file when an upload is complete. Now, if the
file doesn't meet some requriements then must get deleted.

1) The problem is that I'm getting an error as:

PHP Fatal error: Call to undefined function ulink() in /var/www/html/
app/upload.php on line 42


if (!ulink($uploaded_file)) //this line 42 <====
{
error_log("Notice: Couldn't delete file ". $uploaded_file, 0, "/
var/www/html/.../report.log");
}
else
{
error_log("Info: Suspicious file ". $uploaded_file . " removed by
the system.",
}

Thanks.
  #2  
Old March 25th, 2008, 11:05 PM
amit
Guest
 
Posts: n/a

re: How to delete a file on apache using PHP?


On Mar 25, 2:59*pm, amit <amit.ko...@gmail.comwrote:
Quote:
Hi everybody,
>
I'm trying to remove a file when an upload is complete. Now, if the
file doesn't meet some requriements then must get deleted.
>
1) The problem is that I'm getting an error as:
>
PHP Fatal error: *Call to undefined function ulink() in /var/www/html/
app/upload.php on line 42
>
if (!ulink($uploaded_file)) * //this line 42 * <====
{
* * error_log("Notice: Couldn't delete file ". $uploaded_file, 0, "/
var/www/html/.../report.log");}
>
else
{
* *error_log("Info: Suspicious file ". $uploaded_file . " removed by
the system.",
>
}
>
Thanks.


I cann't believe I had a typo !!!

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
"error_reporting" setting not being recognized in my php.ini file laredotornado@zipmail.com answers 1 October 3rd, 2006 03:25 PM
can't get php to read ini file. dylan.boudreau@gmail.com answers 6 September 13th, 2006 07:15 AM
Apache 2.0, php 5 and mysql + win xp genenamg@yahoo.com answers 3 July 27th, 2006 10:05 PM
cannot unlink file that Apache and I have permissions to delete Phil Powell answers 5 July 17th, 2005 08:42 AM