我只是驗證我的網頁並處理錯誤。我的情況是我有導入頭文件的結構,通過<?php include ('header.php') ?>
以及導航文件。現在在瀏覽器中看到它的作用,但是當我使用XHMTL1.1嚴格驗證時,它會出現錯誤。HTML嚴格驗證不識別我導入的文檔?
所以我有一個index.php,它同時導入header.php和navigation.php - 現在我正在寫這篇文章,我意識到navigation.php沒有得到導入到它的css文件,但沒有驗證程序不只是讀取html?所以它應該把它拿起來,看看它得到的信息?
請讓我知道,如果我在這個正確的軌道上,否則似乎你犧牲驗證的結構化網站?
乾杯傑夫PS新年快樂:-)
編輯代碼:
URI:http://thepalmsmarket.co.nz/index.php一個 276 9沒有屬性 「ID」 一 276 24沒有屬性「類「一個 276 38元‘NAV’未定義
我這些都是過去的錯誤,他們都與此代碼:
的index.php:
<?php include_once ("01includes/header.php"); ?>
</head><!--hmtl tag closes in the footer-->
<body class="no-js"><!--The script here is to disable the class put into the body tag if javascript is enabled.-->
<?php include_once ("01includes/navigation.php"); ?>
navigation.php:
<nav id="topNav" class="centeredmenu">
<ul>
<?php
$subject_set = mysql_query("SELECT * FROM webMenu", $dbconnect);
if (!$subject_set) {
die("Database query failed: " . mysql_error());
}
while ($subject = mysql_fetch_array($subject_set)) {
echo "<li class=\"{$subject["class"]}\"><a href=\" {$subject["link"]}\" onclick=\"{$subject["javascript"]}\" title=\"{$subject["title"]}\">{$subject["menuItem"]}</a></li>"; }
?>
</ul>
的CSS是其中導入的header.php desktop.css聲明,但不進入導航。因爲這將是一個雙倍 - 希望是有道理的:-)
您是試圖單獨驗證輸出HTML(每個腳本輸出的內容)還是瀏覽器中呈現內容的完整版本?你能否在這裏粘貼一些例子,以及具體的驗證錯誤? – jcmeloni 2012-01-13 03:42:03
我正在驗證整個結束文檔 - 我將用信息更新我的初始文章。乾杯 – 2012-01-13 03:43:34