<?php
// php 文件引用html文件
// 001
require('index.html');
echo "<br>";
// 002
$file = fopen('index.html','r');
if ($file) {
while(!feof($file)) {
$line = fgetc($file);
echo $line;
}
};
fclose($file);
echo "<br>";
// 003
$str = file_get_contents('index.html');
echo $str;
echo "<br>";
// 004
include ("index.html");
echo "<br>";
?>
网友评论