如何在html文件中导入header、footer等
2015-11-20 23:23
477 查看
1.include是php函数,所以确实需要转化成.php文件--(其实除了用php,html都有自带的引入方法)
2.html转化为php文件很简单,直接改一下后缀名就可以了--(如:index.html直接改成index.php)
3.就是把完整的页面拆分成head.php与index.php页面--(如:导航栏以上代码保存为head.php,剩下保存为index.php)
4.在index.php引入head.php--(也就是index.php头部加入<?php include("head.php");?>)
后续
2.html转化为php文件很简单,直接改一下后缀名就可以了--(如:index.html直接改成index.php)
3.就是把完整的页面拆分成head.php与index.php页面--(如:导航栏以上代码保存为head.php,剩下保存为index.php)
4.在index.php引入head.php--(也就是index.php头部加入<?php include("head.php");?>)
后续
相关文章推荐
- html中a标签的跳转问题
- html基础试题
- HTML特殊符号对照表、常用的字符实体
- HtmlAgilityPack 抓取网页信息
- C#关于iTextSharp将html转换为pdf不支持中文问题
- canvas-6font.html
- canvas-5Bezier-QuadraticCurveTo.html
- canvas-4fillstyle.html
- canvas-4createPattern.html
- canvas-3radialGradient.html
- canvas-3linearGradient.html
- canvas-2arcTo.html
- canvas-star7.html
- canvas-star6.html
- canvas-star6-drawMoon.html
- canvas-star5.html
- canvas-star4.html
- html表格
- a标签返回
- <!DOCTYPE html>