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:
Did you know?Explore Trending and Topic pages for more stories like this.

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

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

Spliting paragraph into sentences and attach in
Here is what I am trying to do

example: Para1[123.456.789!] 3 sentences
Para2

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts

When i am Canseling the Billing Document in VF11 I am getting Shortdump.

IF STATEMENT HELP
Hi
i have created a calendar from a table:

Code: Calendar: October 2009
<table w

Multi dimensional arrays
If I put in this code:

1
2
3
4
5
6
7
8
9
10
11
12
13<

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

PHP and XML image gallery variable issue
I'm trying to display the large image on the same page as the thumbnails, to do that I'm passing a v

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