Which function do you have to use to check whether the $path you’ve stored exists?
Correct answer
C. is_dir()
13 views
C. is_dir()
13 views
The is_dir() function checks whether the given path exists and is a directory. file_exists() also tests existence, but among the options is_dir() is the correct one.
Not sure why the answer is C? Ask here and get an explanation.