Include all files in a dir.

Status
Not open for further replies.
A

Anonymous

Guest
Look up the file system functions. Learn how to read a directly for all the files, open the file, read it and print it, and then close each file in turn!
 
Errm, I think you're confused about classes!

Try something like this:
Code:
$dir = "./";
while($file = each($dir)) {
if (substr($file,-4) == "html") print "<hr>\n".htmlspecialchars(file($file));
}
I just made that up, you might have to play with it a bit to get it to work!
 
Ok, my mistake, but if you knew the code, why did you bother asking?

As it's been sorted, I'll close this thread
 
Status
Not open for further replies.
Back
Top