> 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
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
[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:
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
[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
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=
[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
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
8 matches
Mail list logo