How to include one HTML file into another?

后端 未结 4 908
栀梦
栀梦 2020-12-10 16:59

I have tried every possible question here on stackoverflow but unable to resolve this issue ...

    
    

        
4条回答
  •  不知归路
    2020-12-10 17:38

    The former syntax is SSI, the latter is PHP. Both are server technologies and will only work if accessed from an HTTP server that supports and is configured to check the file for the syntax (which usually means you have to turn the support on and use a .shtml/.php file extension (or change the config from the default to determining which files to check)). Other server side technologies are available.

    The only "include" mechanisms in HTML itself are (i)frames and objects.

    You could also consider a template system such as TT that you could run as a build step to generate static HTML documents (NB: TT can also be used on the fly).

提交回复
热议问题