Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recursive Delete

Status
Not open for further replies.

BostonChowder

Technical User
Sep 8, 2001
8
US
I am trying to delete a large tree of files on my server. What I need is a way to delete it quickly using php.

I usually use telnet with rm -rf directory
But I do not have telnet access to this particular server. How can I do this in PHP?
 
I had some trouble with this.

I used
exec('rm -rf modules');

to remove the directory "modules" which was in the same directory as the php script holding this command.

I had echo statemants on each side of the command and they printed out, but the directory was never deleted.
 
verify that the user_id that the script runs under has permission to delete that directory.


cheers
devnull22
(Knowledge Base Center )

--
Apparently if you play the Windows NT CD backwards you hear satanic messages. If you think that's bad, play it forwards and it installs Windows NT !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top