Home » questions » deleting files from a webserver using php???

deleting files from a webserver using php???

2006-08-06 20:02:13, Category: Programming & Design
i really didn't want to turn to yahoo answers, as many people who look here are noobs at using computers, and i would get a less that intelligent answer... but for you well respected programmers, who know php, how do you delete a file from a webserver using php??? say i have pic.jpg on the directory: ./images/myfolderimg/ (that's a dot before the first /) the location to my designated file is ./images/myfolderimg/pic.jpg, and i want to delete the pic.jpg from this directory, using php??? how...?? thanks for help alex great answers everyone!!! i realized the problem was simply that the file i wanted to delete was not 777 chmod, but the direcotry was... bad mistake on me parto. great answers everyone!!! i realized the problem was simply that the file i wanted to delete was not 777 chmod, but the direcotry was... bad mistake on me parto.

Answers

  1. fang

    On 2006-08-06 20:10:49


    check out this site
  2. Bobby Diz

    On 2006-08-07 00:20:02


    man open the site with frontpage 2003. then u can delete any file in the web server. Bobby
  3. alex94040

    On 2006-08-06 22:30:43


    PHP Unlink() - http://us2.php.net/unlink - is the answer. Remember to make sure that the user under which the web server is running has rights to perform the operation.
  4. duct_tape_is_good

    On 2006-08-06 21:45:38


    not sure if there are any already built in functions for this, but you can do something like edit: just found this http://www.php.net/manual/en/function.unlink.php