在我正在處理的網站中,我有標題&頁腳包含。我希望能夠在網站的每個頁面上使用不同的元描述,但這讓我感到困惑。標題正常工作,但我想知道這是否因爲引號不合。可變元描述
的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' – Matthew 2013-04-28 22:03:15