Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Delete a file in php

Sun Oct 26, 2008 9:03 pm

Code:
<?php
   $file_delete
= "test.txt";
   
   if (
unlink($file_delete)) {
      echo
"The file was deleted successfully.", "\n";
   } else {
      echo
"The specified file could not be deleted. Please try again.", "\n";
   }
?>




Post a reply
  Related Posts  to : Delete a file in php
 delete file in asp     -  
 Delete file     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 DELETE Commands     -  
 Delete directory in php     -  
 Cannot Delete Computer group     -  
 Delete data from database by ID in php     -  
 How can I delete inactive friends?     -  
 DML Statements, insert row, delete row     -  
 Delete session variable     -  

Topic Tags

PHP Files and I/O