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
31
Other forums
URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But
Number Format
Hi All,
I have number '000000000050085' I want to format it to 500.85 Can any one give me
Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.
At the minute I:
check for the orig
Oracle Connectivity
Hi Every One,
Can we access SAP from oracle database.If it possible then please spec
Displaying different page content, depending on the logged in user.
Hi all, I am new to ASP.net (and web development in general), and have a question about how I can di