Is it good practice to add a php include of the head section in my pages?

后端 未结 4 928
我在风中等你
我在风中等你 2021-02-06 11:25

I am creating my portfolio site and I am wanting to include the head section as a php include on my page. Reason being is because the site will have a fair few pages and I will

4条回答
  •  遇见更好的自我
    2021-02-06 12:10

    I'm doing that in my application but I've found that it's not a good idea, because you have many of your stylesheets, javascripts, etc in a php file including the head section and you'll have problems with including it in php files in nested folders. this problem is because of relative paths. If you can use absolute paths then it's ok otherwise it's not a good idea ...

提交回复
热议问题