So I am trying to view the content in subfolders $fileinfo
from a root folder (00skap) which is on network folder in "fs1". PHP error log is not updating any warnings and sometimes it does which is weird. So I can't provide any errors as of now from the PHP error log.
This is my code:
<!DOCTYPE html>
<html>
<body>
<h1>Images</h1>
</body>
<?php
$dirs = '\\\fs1\images\00skap';
$dir = new DirectoryIterator($dirs);
foreach ($dir as $fileinfo) {
if ($fileinfo->isDir() && !$fileinfo->isDot()) {
$fileinfo->getFilename().'<br>';
echo "<font color='red'><a href=\\fs1\images\00skap/$fileinfo\" style='color:#f9c539' >$fileinfo</a></br></font>";
//echo "<button onclick=\"location.href='/////fs1/images/00skap/$fileinfo'\">$fileinfo</button><br>";
}
}
I have tried with those two "echo" options. The first one I get a 404 - File or directory not found. The other one only loads the page a long time and later crashes. I'm positive that I have the right location and permissions can't be a problem.
This is how I view the subfolders before I try to view the content inside them:
I know I might have a syntax error here or something obvious but I've looked at this now for several hours.
Thank You!
P.S. I'm browsing on Firefox but I can use other options.
Update
"Config Error: Cannot read configuration file due to insufficient permissions." Found the "web.config" file that says:<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <remove name="FastCGI" /> <add name="FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" resourceType="File" /> </handlers> </system.webServer> </configuration>