You are here: Re: When "static" isn't "static" « PHP Programming Language « IT news, forums, messages
Re: When "static" isn't "static"

Posted by comp.lang.php on 12/05/05 21:40

No I'm sorry I think you misunderstood my problem. I wound up having
it solved earlier; the problem had to do with the way I was using the
static option, which I still believe illuminates a potential PHP logic
flaw when it comes to using "static".

Phil

Sjoerd wrote:
> Why do you need this? What do you want to do? Do you want to
> recursively walk trough directories? In that case, here is an example:
>
> function traverse($dir) {
> $dh = opendir($dir);
> while ($file = readdir($dh)) {
> if ($file{0} == '.') continue;
> $path = $dir.'/'.$file;
> if (is_file($path)) {
> echo $file."\n";
> } else {
> traverse($path);
> }
> }
> closedir($dh);
> }

 

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

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