Page 1 of 1

How to remove the fdf file using php code

Posted: Thu Jan 24, 2008 12:58 am
by maruuma
Hi every body,
I'm new php user.
I used the code belowe to create a file, and I need some help to remove the created file from the server:

***** PLEASE USE THE

Code: Select all

TAG *****[/color]

Code: Select all

if($fp=fopen($fdf_dir.'/'.$fdf_file,'w')){
                fwrite($fp,$fdf_data,strlen($fdf_data));
               // echo $fdf_file,' written successfully.';
            }else{
                die('Unable to create file: '.$fdf_dir.'/'.$fdf_file);
            }
            fclose($fp);
            
        }
    }else{
        echo 'You did not submit a form.';
    }
pleasssssssssssssssse help me :oops:

Re: How to remove the fdf file using php code

Posted: Thu Jan 24, 2008 3:31 am
by jimthunderbird
check out unlink

Re: How to remove the fdf file using php code

Posted: Thu Jan 24, 2008 6:27 am
by maruuma
Thanxxxxxxxxxxxxx alot.
It is work. :D