You cant upload a PHP page to the HTML Validator.
That is a limitation of the W3C's validation web service.
To validate a PHP page using the W3C's validation service, you must upload the php page to a remote host and validate the remote copy.
The W3C validation service cannot process PHP code. Only HTML code.