如何从php文件创建html文件


How can I create an html file from a php file?

对于我的静态html,我想保留一个可以同时发送所有文件的大文件。在这种情况下,module.2.Mega.php。。。如何从命令行使用php将该文件的HTML输出到module.2.Mega.htm

我在一个猛烈的

<!DOCTYPE html>
<html>
  <body id="body">
    <?php include 'module.2.Mega.php';?>
  </body>
</html>

创建HTML文件后,我会得到:

<!DOCTYPE html>
<html>
  <body id="body">
    <?php include 'module.2.Mega.htm';?>
  </body>
</html>

我如何从命令行使用php来输出文件到模块2.Mega.htm

php module.2.Mega.php > module.2.Mega.htm

您可以在HTML页面中编写PHP代码,而不是在一个页面中编写。PHP和另一个页面。HTML