Heim >Backend-Entwicklung >PHP-Tutorial >PHP程序如何调用html文件?小白问题,求指导!!

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:39:251332Durchsuche

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


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

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



请问这个如何调用呢??


回复讨论(解决方案)

include 进来就可以了

file_get_contents('xxx.html');

include('xxx.html');


或者

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

include require 都可

include  require

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn