How to include static html in php/smarty

前端 未结 4 465
独厮守ぢ
独厮守ぢ 2021-01-13 14:49

I have been asked to include some html snippet in this php/smarty page. It\'s basically a sales agreement at the end of an overview page before you pay.

What is the

4条回答
  •  迷失自我
    2021-01-13 15:32

    Do you mean include a file containing static HTML?

    {include file="htmlfile.html"}

    edit

    As the file is just HTML, it might be better to use {fetch}, e.g.

    {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.

提交回复
热议问题