Easy and efficient way of breaking up html code into several files and using php's include()

Currently, for things like a header, footer or common sidebar object, I create a custom `.php` file and do something along these lines: echo ' '; and then include it on the pages that I want it to appear: include('path/to/file'); The only problem with this is that someone can point their browser to my `.php` file and view part of html on its own. It isn't a huge deal, but it seems unprofessional and a little careless. Is there a better way of doing this?
We had a related question just minutes ago: stackoverflow.com/questions/8189834/phpdefined-or-exit

以上就是Easy and efficient way of breaking up html code into several files and using php's include()的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏