#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    61
    Rep Power
    14

    How to write a PHP script to remove a file?


    I got a text file in server. After I load it into a table with php script, I want to remove it. How could I write a php script to remove it?
    Why XM Satellite is hot. Find out now at http://www.xmxp.com
  2. #2
  3. AZbb founder
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2004
    Location
    London, UK
    Posts
    843
    Rep Power
    14
    If you want to delete it, look in PHP manual for unlink().

    Good luck
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    13
    Rep Power
    0
    Yeah like he said it is really easy:


    $deletedir = --complete directory---';
    $file_name = hello.txt;
    $deletefile = $deletedir.$file_name;

    //Delete the file
    unlink($deletefile);


    Hope this helped

    Joseph

IMN logo majestic logo threadwatch logo seochat tools logo