简体   繁体   English

在PHP中包含标头和元标记

[英]Include header and meta tags with php

我知道搜索引擎在搜索网站时会在html标头中查找元标记,因此我想知道是否使用php将其包含在页面中会影响如何找到我的网页?

Yes, it will help. 是的,它将有所帮助。 Typically you might use some of the content from the page to generate the meta-tags. 通常,您可能会使用页面中的某些内容来生成元标记。 There are character limits to the tags, so make sure you cut off the content before you over-run. 标签有字符限制,因此请确保在超载之前先切断内容。 I always used to have a standard format, with some constant content (like site title, or section name) plus a variable content generated page by page. 我一直使用一种标准格式,其中包含一些恒定的内容(例如网站标题或部分名称),以及逐页生成的可变内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM