W3C home > Mailing lists > Public > www-validator@w3.org > December 2006

Re: failing validation - PHP

From: Rui del-Negro <w3validator@dvd-hq.info>
Date: Sat, 23 Dec 2006 17:42:59 -0000
To: "Milan Tomek" <milanot12@yahoo.com>
Cc: www-validator@w3.org
Message-ID: <op.tk0wtxd8jf0k3w@bigbang>

> The extensions of my files are PHP. But it has never been a problem with  
> this before. But when I walidate a HTML file on the same location, it  
> works.

You cannot use a markup validator to check PHP code. PHP is a scripting  
language. It needs to be parsed by the server to produce HTML markup.

Put the file on a server that can process PHP files, and then enter the  
file's URL into the validator. The validator will then request the file  
 from the server, the server will execute the PHP code (hopefully producing  
valid HTML), and send that HTML to the validator.

If this is what you are currently doing, then it seems that your server is  
sending the wrong Content-Type to the clients. Check your server  
configuration or contact your server's admin.

Received on Saturday, 23 December 2006 17:43:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:50 UTC