PHP程序如何调用html文件?小白问题,求指导!!

WBOY
Release: 2016-06-23 14:39:25
Original
1290 people have browsed it

index.php是我得php文件,当输入某个网址的时候会加载index.php文件的内容;


但是index.php文件我目前是做调试用的,就是一个echo "hello";

现在我需要让index.php文件去调用我的一个html文件,该html文件是我要在页面显示的一些内容;



请问这个如何调用呢??


回复讨论(解决方案)

include 进来就可以了

file_get_contents('xxx.html');
Copy after login

include('xxx.html');
Copy after login


或者

$str = file_get_contents('a.html');echo $str;
Copy after login

include require 都可

include  require

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template