Answers for "php get folders"

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
-1

php list directories

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

php list all files in directory

scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
Posted by: Guest on April-23-2020

Browse Popular Code Answers by Language