Reply to Re: Remove directory that is not empty?

Your name:

Reply:


Posted by Christoph Burschka on 03/26/07 18:11

Bill wrote:
> Is there a PHP function that will remove a directory that is not empty?
> I am looking for a solution that is easier than writing a recursive
> routine to delete the files in the directory tree one-by-one. Thanks
>

Can PHP run system() commands on your web server? If so, system("rm -rf ...");
(or Windows equivalent) will be the simplest.

Just make sure you do really good tests on the path used as a parameter, because
there's nothing that ruins your day like a PHP script with a vulnerability that
lets it delete your entire site.

--
cb

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация