#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    15
    Rep Power
    0
    Is it possible to delete a file(a jpg in fact) from a PHP script. I would like to ad this functionality to an existing script that deletes a record from a MySQL db. Only the image name is stored in the db.
    Many Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    59
    Rep Power
    15
    ya, just use unlink:

    unlink("mypic.jpg");

    It's returns 1 if deleted and 0 if not.

    Chris

Similar Threads

  1. php script won't work inside "cgi-local" directory
    By Volitics in forum PHP Development
    Replies: 5
    Last Post: April 26th, 2004, 10:50 PM
  2. Replies: 3
    Last Post: February 17th, 2004, 10:08 AM
  3. How to write a PHP script to remove a file?
    By xmxpcom in forum PHP Development
    Replies: 2
    Last Post: February 16th, 2004, 05:58 PM
  4. How to see the Memory used by a PHP script?
    By Pardall in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 03:54 PM
  5. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM

IMN logo majestic logo threadwatch logo seochat tools logo