gpt4 book ai didi

php - 如何在 php/smarty 中包含静态 html

转载 作者:太空宇宙 更新时间:2023-11-04 14:08:34 24 4
gpt4 key购买 nike

有人要求我在此 php/smarty 页面中包含一些 html 片段。在您付款之前,它基本上是概述页面末尾的销售协议(protocol)。

将静态 html 包含到我的 php/smarty 模板中的代码是什么?

谢谢...

最佳答案

你的意思是包含一个包含静态 HTML 的文件吗?

<罢工> {include file="htmlfile.html"}

编辑

由于文件只是 HTML,使用 {fetch} 可能会更好,例如

{fetch file="path/to/html/file.html"}

For local files, either a full system file path must be given, or a path relative to the executed php script.

关于php - 如何在 php/smarty 中包含静态 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2666736/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com