I am wanting to show the content of each file that is in the articles variable, like using the include() function. They are all .txt files. How would I go about doing that?
This is my code.
<?php
$dir = "articles/";
if ($handle = opendir('articles/')) {
while (false !== ($articles = readdir($handle))) {
echo "<a href=$dir$articles>$articles</a><br>";
}
closedir($handle);
}
?>