適当1
<html> <body> <?php //テキストファイルを読み込んでHTMLに成形する if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file = "test.txt") { $rec = ''; $mlms = ""; if (!($fno = fopen($file, 'r'))) { die; } while (!feof($fno)) { $rec = fgets($fno, 32000); $mlms = $mlms.$rec; } fclose($fno); print("$mlms"); } } closedir($handle); } ?> </body> </html>