You are here: Re: deleting all the files in a directory « PHP Programming Language « IT news, forums, messages
Re: deleting all the files in a directory

Posted by NC on 02/13/06 22:28

laredotorn...@zipmail.com wrote:
>
> Using PHP 4, what are the shortest amount of lines I can write to
> delete all the files in a given directory?

One, if you are willing to live with an OS-dependent solution. You can
read your OS manual for the command that removes files (rm on Unix or
del on Windows), figure out what comand-line keys are necessary to
remove all files in a given directory, and pass the respective command
to your operating system via exec(), passthru(), or system().

Cheers,
NC

 

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

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