如何直接编辑HTML文件? [英] How do I edit HTML files directly?

查看:174
本文介绍了如何直接编辑HTML文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个使用静态HTML档案来提供内容的网志/留言板。我知道MovableType用于管理他们的博客工程这种方式,但使用Perl CGI脚本。如何使用PHP编辑/附加到HTML文件?人们会推荐什么其他方法?

I'm trying to build a blog/messageboard that uses static HTML files to serve content. I know MovableType used to manage their blog engiene this way, but using Perl CGI scripts. How do I edit/append to HTML files preferebly using PHP? What other methods would people reccommend?

推荐答案

在php中有很多文件操作函数。 请在这里阅读更多信息。下面是一个创建html文件的快速示例:

In php there are many file manipulation functions. Read more about them here. Here's a quick example creating an html file:

<?php

file_put_contents('an_html_file.html', "This will be in the html file.");

?>

这篇关于如何直接编辑HTML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆