如何使用PHP显示一个或多个HTML页面?

Sea*_*oth 2 html php if-statement

我想使用PHP和if语句,我想这样做

if ($variable){
display html page1
}
else {
display html page2
}
Run Code Online (Sandbox Code Playgroud)

我该怎么做呢?请注意,我不想将用户重定向到其他页面.

--EDIT--我对其中一个做这个没有问题,但另一个文件,这样做太麻烦了.

--EDIT--到目前为止这是编码:

<?PHP
include 'uc.php';
if ($UCdisplay) {
    include("under_construction.php");
}
else {
    include("index.html");
}
?>
Run Code Online (Sandbox Code Playgroud)

我的问题是,如果我必须为每个php页面创建一个html页面,那将是非常复杂和令人困惑的,所以我需要一些方法来显示完整的html页面而不是使用include("index.html")

Tho*_*mas 7

if ($variable){
  include("file1.html");
}
else {
  include("file2.html");
}
Run Code Online (Sandbox Code Playgroud)