【发布时间】:2013-04-28 22:01:12
【问题描述】:
在我正在处理的网站中,我包含页眉和页脚。我希望能够在网站的每个页面上使用不同的元描述,但这让我感到困惑。标题工作正常,但我想知道这是否是因为涉及引号。
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"; ?>
感谢您提供的任何帮助。
【问题讨论】:
-
在您分配给
$title和$desc的标题之后包括