Addressed to: mohammed oda <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
** Reply to note from <[EMAIL PROTECTED]> Mon, 23 Apr 2001 13:30:37 +0200 (CEST)
>
> On Mon, 23 Apr 2001, mohammed oda wrote:
>
> > hi
> > can somebody help me how can i delete non-empty directory by php
> > command(rmdir) or another command.
> > with rmdir i can only delete empty directory.
>
> system ("rm -rf /");
I know this is not the list for this question (php-general would be much
better) but that answer is vicious. That command will delete every file
on the system that is writable by the web server, or the user running
php.
It is the right track, the answer is
system( "rm -rf /path/to/directory/to/delete" )
Be very careful, if a hacker can trick your program, say by entering:
Directory to delete: [somedirectory / ]
and you don't catch it by closely checking your user input you are
opening a BIG security hole on your system.
Any further questions on this subject should be moved to the php-general
list, php-dev is for the development _of_ php, not developing with it.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]