I have PHP installed on a web server administered by Plesk. I am having some PHP include_path problems which I have narrowed down to absolute paths apparently not working.
So, if I try to do a directory listing, the following works:
echo "<h3>Directory listing of .</h3>";
foreach (new DirectoryIterator('.') as $fileInfo) {
if($fileInfo->isDot()) continue;
echo $fileInfo->getFilename() . "<br>\n";
};
But this gives no output. (There are files there).
echo "<h3>Directory listing of /var/www</h3>";
foreach (new DirectoryIterator('/var/www') as $fileInfo) {
if($fileInfo->isDot()) continue;
echo $fileInfo->getFilename() . "<br>\n";
};
Output:
Directory listing of .
.htaccess
index.php
try.php
Directory listing of /var/www
Any ideas?