简体   繁体   English

如何创建动态HTML文件

[英]How to create dynamic html files

I am creating an Electronic Book and in every page of it there is a JPEG file. 我正在创建一个电子书,它的每一页中都有一个JPEG文件。 I have 224 pages/pictures. 我有224页/图片。 Every picture is called from an HTML file. 每张图片都是从HTML文件中调用的。 So i have 224 HTML files. 所以我有224个HTML文件。

But i am wondering if there is a way to create those HTML files dynamically every time the user clicks on my Electronic Book. 但是我想知道是否有一种方法可以在用户每次单击我的电子书时动态创建这些HTML文件。 But the files must be created before the user visits the page. 但是必须在用户访问页面之前创建文件。 Also i am thinking that maybe there are Electronic Books with more pages/pictures (1000 for example). 我也在想,也许有电子书有更多的页面/图片(例如1000)。 So in order to have statically so many HTML files it is better to create them dynamically when the user clicks and when the user leaves delete the HTML files. 因此,为了静态拥有这么多HTML文件,最好在用户单击时和在用户离开时删除HTML文件时动态创建它们。

So i am looking for an HTML constructor. 所以我在寻找HTML构造函数。

Thanks in advance. 提前致谢。

Why don't you use PHP? 为什么不使用PHP? you'll have less html files than 224 pages. 您的html文件少于224页。

HTML基本上用于静态内容。如果您想拥有动态内容,则页面必须是动态的,并且必须有提供诸如数据库之类的数据的源。您可以使用诸如php之类的动态源来生成html文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM