Home > Backend Development > PHP Tutorial > 如何生成包含静态文件的页面快照?

如何生成包含静态文件的页面快照?

WBOY
Release: 2016-06-06 20:32:44
Original
1344 people have browsed it

就是想把某一个版本的页面给存档起来,包含当时的所有静态资源。我找了下网上关于快照的好像都只是把html存起来

回复内容:

就是想把某一个版本的页面给存档起来,包含当时的所有静态资源。我找了下网上关于快照的好像都只是把html存起来

使用 phantomjs

<code>var page = require('webpage').create();
page.open('http://example.com', function () {
    page.render('example.png');
    phantom.exit();
});
</code>
Copy after login

Ctrl+S不行吗?

Related labels:
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