As the title says (but I may have worded it wrong), I want to be able to change the appearance of a web directory, for example this. Is there a way of calling it within a webpage and applying formatting to it? As that seems to be the most logical way. I could write an index.html page for the directory and manually input all of the links to the files, but I want it to update itself, as and when files are deleted/added. Does this make sense? Any ideas?
I have a very basic PHP page which lists all the files in a directory (non recursive) and has small image previews. I can send it to you if you want. I'm working on a way to make it 403 but its not working right.
If you could Doug, I would appreciate it. It'll be to simply display links to .pdf files from a directory. [matt at slickhouse dot com]
I'm getting the following PHP error: Code: Fatal error: Using $this when not in object context in /.../example/index.php on line 10 with line 10 being PHP: $this->dir = "."; Any ideas? I feel like an idiot at times...
Weird, the exact same file works on my site http://www.voidedwarranty.co.uk/Photos/ trying putting @ infront of the $
If only suppressing fatal errors made them go away @ Lazlow - Search for 'icons' in your httpd.conf/apache.conf. I think directtory contains the icons you see. Not sure about a custom index.html and I don't have an apache install available at the mo to check.
I ended up with the following: PHP: <?php if ($handle = opendir('files/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo '<span class="links"><p><a href="http://test.slickhouse.com/newsletter/files/'.$file.'">'.substr($dir,strpos($dir,"files/")+1).$file."</a></p></span>"; } } closedir($handle); } ?> It's messy, but uses the opendir() function and works well for what I needed.