我想驗證網站http://www.athometechsolutions.net/index.php,我遇到了麻煩。PHP網站代碼驗證,並不同時驗證
當我鍵入URL到W3驗證服務,我得到以下錯誤:
Error Line 12, Column 1: character data is not allowed here
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
不過,我看不出什麼毛病的代碼。而且,更令人費解的是,當我將「view-source」代碼複製並粘貼到W3驗證服務中時,它會通過。
我真的很想讓它通過它自己,我不明白爲什麼它不會。
在我看來,它與文檔頭部的第一個php include有關,因爲當我將塊從include移入常規頭時,錯誤消息位置會發生變化。但是,在我看來,它應該加載得很好(從PHP - Is it dumb to load <head></head> data as an include和其他文件)。
所以,我問,我怎麼能通過URL驗證它?
謝謝!