Reply to Re: [PHP] is_dir() question

Your name:

Reply:


Posted by Jochem Maas on 09/26/05 14:28

maybe the following helps you (a little):

vlad georgescu wrote:
> i have the code below
> **
> *if ($dir = @opendir("dir2open"))

$path = "dir2open"; // make this into a proper path!
if ($dir = @opendir($path))

> {
> while($file = readdir($dir)) {
> //if (($file!='.') && ($file!='..') && ($file!='.htaccess') && ($file!='
> index.php')) {
> // if (is_dir($file)) { // print just "." & ".."

if (is_dir($path.$file)) {

> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> // if (is_file($file)) { // works fine
> if (!is_file($file) & ($file!='.') && ($file!='..') ) { // works fine (print
> dir)
>
> print $file."<br>";
> }
> }
> }
>
> closedir($dir);
> *
> the problem is that, function is_dir() returns true only for "." and ".."
> is_file works fine, and I used !is_file() but ..... the question is: what is
> wrong here?
> i use php4, but i don't think is a bug

you're right php4 is not a bug. :-)

>

[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

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