Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 25th, 2008, 11:05 PM
amit
Guest
 
Posts: n/a
Default How to delete a file on apache using PHP?


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
Default 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 !!!

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles