Check Dir Php

[Solved] Check Dir Php | Php - Code Explorer | yomemimo.com
Question : is dir php

Answered by : harendra

<?php
$myfile = "user/home/documents/gfg";
// checking whether a file is directory or not
if (is_dir($myfile)) echo ("$myfile is a directory");
else echo ("$myfile is not a directory");
?>

Source : | Last Update : Fri, 18 Feb 22

Question : check dir php

Answered by : indonesia-people

The file_exists() function in PHP is an inbuilt function which is used to check whether a file or directory exists or not. The path of the file or directory you want to check is passed as a parameter to the file_exists() function which returns True on success and False on failure

Source : https://www.geeksforgeeks.org/php-file_exists-function/#:~:text=The%20file_exists()%20function%20in,success%20and%20False%20on%20failure. | Last Update : Fri, 18 Feb 22

Answers related to check dir php

Code Explorer Popular Question For Php