You are here: Re: recursive delete all files/folders « PHP Programming Language « IT news, forums, messages
Re: recursive delete all files/folders

Posted by Erwin Moller on 09/13/05 13:10

betterdie@gmail.com wrote:

> Dear guru
>
> I want to delete all file and folder recursivly under php code, can
> anyone give me commend for this.
>
> Thank very much

Hi,

It is not too complicated.
But pay attention to potential problems concerning file and directory
permissions.
Remember that PHP runs as user 'nobody' or 'apache' or 'www-data' on most
*nix machines, and as IUSR_XXX on W$ machines/IIS.

That user needs appropriate right to delete files and directories.

For some reference and code-examples, start reading here:
http://nl2.php.net/dir
and
http://nl2.php.net/manual/en/ref.filesystem.php

You will probably use functions like rmdir() and unlink().

Good luck!

Regards,
Erwin Moller

 

Navigation:

[Reply to this 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

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