3
내 질문 : PHP 파일로 여러 html 파일을 읽을 가능성이 있습니까? 지금은 파일의 내용 읽기 위해이 코드를 사용 :디렉토리에서 PHP로 여러 파일 읽기
<?php
$file_handle = fopen("myfiles/file1.html", "r");
while (!feof($file_handle)) {
$line = fgets($file_handle);
echo $line;
}
fclose($file_handle);
?>
을하지만이 나에게 예 : file1.html의 내용 만 제공
그래서 이런 식으로 뭔가를 할 수있는 경우에는 내가 궁금 해서요 : 위의
<?php
$file_handle = fopen("myfiles/*.html", "r");
while (!feof($file_handle)) {
$line = fgets($file_handle);
echo $line;
}
fclose($file_handle);
?>
* 모든 .html 중에서 파일
그렇게 할 수있는 방법이 있습니까
을 나타냅니다?
[디렉토리에서 특정 파일의 PHP 목록] (의 중복 가능성 http://stackoverflow.com/questions/3062154/php-list-of-specific-files-in -a-directory) – putvande