I use scandir() to search files recursively. But if the file path directs to a file not a folder, there will be a warning. How can I check the path whether it directs a file
Have a look into is_dir() and is_file()