is_dir() problem


Posted on 16th Feb 2014 07:03 pm by admin

Hello,

I'm buidling a php scripts that dynamically get's subfolders from a specific folder.
my code:

Code: <?php

if(isset($button)){

$opendirdepot = opendir("C:/xampp/htdocs/arl/$depot/");


while($dirdepot = readdir($opendirdepot)){

if(is_dir($dirdepot)){

echo "Is a folder: ".$dirdepot."<br />";

}else{

echo "Is not a folder: ".$dirdepot."<br />";

}

}

closedir($opendirdepot);

}

?>
Output:

QuoteIs a folder: .
Is a folder: ..
Is not a folder: 20091012
Is not a folder: 20091013
Is not a folder: Error_.log
Is not a folder: Error_20091013.log
The problem is that 20091012 and 20091013 are in fact folders.

Anyone an idea?

Thanks

No comments posted yet

Your Answer:

Login to answer
226 Like 31 Dislike
Previous forums Next forums
Other forums

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo

help removing unwanted graphic
How do I remove the small elongated rectangular shape between the "Latest post" and "

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code.

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash