Re: [PHP] listing directories

2005-03-15 Thread Richard Lynch
> if ($dir = opendir($path)) > { > while($file = readdir($dir)) > { > if ($file != "." && $file != "..") > { > echo "$file"; > if (is_dir($file)) USE: is_dir("$path/$file") to get the full pathname so that PHP has some idea *which* directory it's suppose

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
I replaced is_dir() with filetype() and code works just fine. But the question is still there! :) -afan [EMAIL PROTECTED] wrote: Ok, I wasn't able to find anything in archive to fit my needs... This is a problem: To display content of directory I have this code: if ($dir = opendir($path)) { whil

Re: [PHP] listing directories

2005-03-15 Thread Chris Ramsay
[snip] > How I can get answers on this queastion? I have a same problem and don't > want to bother you again with same thing :) [/snip] Check out the mail archive, mate... http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
Ok, I wasn't able to find anything in archive to fit my needs... This is a problem: To display content of directory I have this code: if ($dir = opendir($path)) { while($file = readdir($dir)) { if ($file != "." && $file != "..") { echo "$file"; if (is_dir($file

RE: [PHP] listing directories

2005-03-15 Thread Jay Blanchard
[snip] Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) [/snip] http://www.php.net/readdir -- PHP General Mailing List (htt

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
That's a problem - didn't know where to look :) Thanks! Chris Ramsay wrote: [snip] How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) [/snip] Check out the mail archive, mate... http://marc.theaimsgroup.com/?l=php-general&r=

Re: [PHP] listing directories

2005-03-15 Thread John Nichel
[EMAIL PROTECTED] wrote: Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) Search the archives. -- John C. Nichel ÜberGeek Keg

[PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) Thanks -afan -- PHP General Mailing List (http://www.php.net/) To unsubscri