在我正在处理的网站中,我包含页眉和页脚。我希望能够在网站的每个页面上使用不同的元描述,但这让我感到困惑。标题效果很好,但我想知道这是否是因为涉及引号。
header.php 代码是:
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $desc; ?>">
<meta name="keywords" content="neurologist, neurologic, neurology, nervous system, brain, seizure, epilepsy, carpal tunnel, seattle, ballard, washington, wa, king county, swedish hospital">
index.php 代码是:
<?php include ("header.php"); ?>
<?php $title = "Neurologic Clinic | Dr. Hal Rappaport | Seattle Neurologist"; ?>
<?php $desc = "Dr. Hal Rapport is a neurologist located in Seattle's Ballard neighborhood. He specializes in neurologic conditions and disorders and is also a certified psychologist"; ?>
感谢您提供任何帮助。