Answers for "php find directory"

PHP
0

php get directory

$currentDirectoryName = basename(__DIR__);
echo 'Currently in the '.$currentDirectoryName .' directory <br><br>';

$fullPath = dir(getcwd());
echo 'The full path is: ' . $fullPath->path . '<br>';
Posted by: Guest on July-01-2021
0

php directory listing

if ($handle = opendir('.')) {

    while (false !== ($entry = readdir($handle))) {

        if ($entry != "." && $entry != "..") {

            echo "$entry\n";
        }
    }

    closedir($handle);
}
Posted by: Guest on June-08-2020
4

php get all php files in a directory

foreach(glob('includes/*.php') as $file) {
    ...
}
Posted by: Guest on March-21-2020
-1

php list directories

$dir = '.';
$directories = glob($dir . '/*', GLOB_ONLYDIR);
Posted by: Guest on July-22-2020

Code answers related to "php find directory"

Browse Popular Code Answers by Language