I want to validate my PHP project to meet the W3C standard. Can some one explain how to do the PHP file validation using W3C.org?
Is it possible to validate PHP files from the linux console?
Advertisement
Answer
You do not validate the PHP file on the W3C Validator. What the validator validates is the (X)HTML markup, the output of your PHP pages.
If your PHP project is hosted on the net, simply give the URL to the validator.
If your PHP project is hosted locally, you will have to save the output to a text file and upload this to the validator. To do this, from your browser, open the “File” menu and choose “Save Page As”… (or press CTRL + S).
Alternatively, there are a variety of validator plugins available for your browser. Here are some for Firefox and Chrome.