I'm trying to make a blog script, that will include each file (03.11.19.php(date YY.MM.DD)) in order... so that I don't have to put them all in a file, i then later i want to have it categorize the blogs per year. which is why i did the filenames the way they are... I'm VERY open to suggestions, I can get this to work with one file, and I know why it doesn't work with two, because it tries to add all the filenames into one var. $file_list But i just can't think of a way to seperate it so that i can load all those files. Thank you all for your time.
Code: Select all
<?PHP
$dir_name = "blogs/";
$dir = opendir($dir_name);
$file_list = "";
$files = "";
while ($file_name = readdir($dir)) {
if (($file_name != ".") && ($file_name != "..")) {
$file_list .= "$file_name";
}
}
$files .= "$dir_name";
$files .= "$file_list";
closedir($dir);
?>