I have a test directory that contains one directory and one file. I want my program to search through this test directory and find the file. But the code is not recognizing the sub-directory as a directory and treats it as a file. The section of code where I am testing for this looks like this. I am testing in three different ways trying to find the problem.
When the test directory is read, I get four entries:
. //should be a dir
.. //should be a dir
edited //should be a dir
file.php //should be a file
The output of var_dump is false for all four while is_dir and filetype recognize the first two as directories but the see the last two as files. Can anyone see where I might be going wrong?
Jack