2013-03-17 2 views
0

http://www.athometechsolutions.net/index.php 웹 사이트의 유효성을 검사하려고하는데 문제가 있습니다.PHP 사이트 코드의 유효성을 검사하는 동시에 유효성을 검사하지 않습니다.

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. 

그러나, 나는이 코드를 잘못 아무것도 볼 수 없습니다 나는 W3 유효성 검사 서비스에 URL을 입력하면

, 나는 다음과 같은 오류가 발생합니다. 그리고 더욱 당황하게 만드는 것은 "view-source"코드를 복사하여 W3 유효성 검사 서비스에 붙여 넣으면 패스된다는 것입니다.

나는 그것이 자신에게 전달되기를 정말로 원했고, 왜 그렇게되지 않을지 알 수 없다.

필자는 include와 include에서 일반 헤더로 조각을 옮길 때 오류 메시지 위치가 변경되기 때문에 문서 머리 부분에 첫 번째 PHP 포함과 관련이 있다고 보입니다. 그러나 그것은 나에게 그것은 잘로드되어야합니다 (PHP - Is it dumb to load <head></head> data as an include 및 기타 문서에서) 것으로 보인다.

URL을 통해 유효성을 검사하려면 어떻게해야합니까?

감사합니다.

답변

1

메모장에있는 16 진수 편집기보기에서 페이지의 소스 코드를 보면 + 바이트 유효성 검사기에 언급 된 메타 요소 앞에 바이트 순서 표시가 있음을 알 수 있습니다.

Byte Order Mark는 대부분의 편집자가 표시하지 않으므로 위치를 알아 내기가 매우 어렵습니다.

And, what makes it even more puzzling, is that when I copy and paste the "view-source" code into the W3 validation service, it PASSES.

당신이 &이 검증에 붙여 복사 할 때 순서 표시는 문서의 시작 부분에 의미를 만드는 바이트, 대부분 편집기 (또는 체인의 다른 구성 요소)가 자동으로 제거됩니다 때문에

.

관련 문제