<?php
if ($dh = opendir('/etc/apache2/')) {
echo "Directory handle: $handle\n";
echo "Entries:\n";
/* This is the correct way to loop over the directory. */
while (false !== ($entry = readdir($dh))) {
echo "$entry\n";
}
closedir($dh);
}
<br />
<b>Warning</b>: opendir(/etc/apache2/) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: No such file or directory in <b>/in/unvRv</b> on line <b>3</b><br />
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.2
<br />
<b>Warning</b>: opendir(/etc/apache2/): failed to open dir: No such file or directory in <b>/in/unvRv</b> on line <b>3</b><br />
Output for 4.3.0 - 4.3.1
<br />
<b>Warning</b>: opendir(/etc/apache2/) [<a href='http://www.php.net/function.opendir'>function.opendir</a>]: failed to open dir: No such file or directory in <b>/in/unvRv</b> on line <b>3</b><br />