R
R
rinaz222020-05-28 09:12:07
PHP
rinaz22, 2020-05-28 09:12:07

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>";
}

When I call the function on the directory containing the .htaccess file, it does not see the .htaccess file, but shows the rest of the files and folders without any problems.
Is this a glob constraint or what? and how can it be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hesy, 2020-05-28
@rinaz22

https://stackoverflow.com/questions/20906185/get-a...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question