<?php
header(
'Content-type:text/html;charset=utf-8'
);
$i
= 1;
foreach
(
glob
(
'/file/*.txt'
)
as
$txt
)
{
echo
'第'
.
$i
.
'个文件'
.
basename
(
$txt
).
'的内容是:'
;
echo
file_get_contents
(
$txt
);
$i
++;
echo
'<hr/>'
;
}