Answer the question
In order to leave comments, you need to log in
How to see .htaccess file in php?
Hello! On the Internet, I found a PHP function that shows all folders and files in the specified directory. Here is the code:
function removeDirectory($dir) {
if ($glob = glob($dir."/*")) {
foreach($glob as $g) {
if (is_dir($g)) {
removeDirectory($g);
} else {
echo "- ".$g."<br>";
}
}
}
echo $dir."<br>";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question