![]() |
php script to find and list files..
i would like a little php script where from when it loads it gets the
files from he dir "Scripts" and if the extension is *.mrc i want it to list the files as links with a box below with scroll bars. (like a code box) so when i click on the link for the file it will add all the text from the file into the box below can any one help me or have a link please ^_^ thanks alot |
|
http://us4.php.net/function.opendir
i think this is the function and stuff you would use to do this :) good luck |
What you are looking for is a little more restrictive than what I implemented at my site... but here is some code from an image PHP script I have... that will help you out a bit...
:
$imgDir = opendir("."); |
IR, php 5 supports !== which also tests for type, it's a nice extra check to make sure . and .. are not included, just a comment.
|
!== is the not equal to strict evaluator, it makes sure that the boolean is evaluated without auto-cohersion, i'm confused... how is this used in the script?
|
if $fileName !== "."
I've used it and for some reason it worked better than != i forget why, i'll look into it. |
Diz, I have PHP 4.x :)
|
fine, don't take my advise..:)
|
if it makes ya feel better I will be updating to 5 this weekend :) i'll change my script for ya then :)
|
| All times are GMT -5. The time now is 6:25 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC