Is wordpress overriding the pre-defined scandir function of PHP?

Question

Let’s say I have a file:

script.php

/path/to/example.com/wp-content/plugins/sample_plugin/child/grand_child/script.php
<?php
$files = scandir('/path/to/example.com/wp-content/plugins/sample_plugin');
foreach( $files as $file ) {
    echo $file . '<br/>';
}
?>

There is a file called sample_plugin.php inside the directory /path/to/example.com/wp-content/plugins/sample_plugin which was not reflected on the printed list.

It seems the file was purposely hidden of some sort.

Is wordpress overriding the pre-defined scandir() function of PHP?

0
Abel Melquiades Callejo 4 years 2020-03-06T19:50:48-05:00 0 Answers 117 views 0

Leave an answer

Browse
Browse