Jump to content

Recommended Posts

Although Im familiar with using validators for html and css.

What in your opinion would be the best way to run my files through a validator?

The validator I currently use http://validator.w3.org/ thows up 75 errors as it is looking at my php.

Is it best to turn my php into an html comment for the purpose of testing the html, or is there a better way of testing my files that contain server side scripting?

maybe there is a validator that ignores anything within php tags?

 

Link to comment
https://forums.phpfreaks.com/topic/240469-validating-html-within-a-php-file/
Share on other sites

Your php based page is not a complete web document until the php code in it has been parsed, tokenized, interpreted, and the php code outputs the dynamically produce portions of the page.

 

If you are doing this on a localhost development system, you would browse to the page on your localhost server and copy/paste the 'view source' from your browser into the w3.org validator. If you are doing this on a publicly accessible server, you would enter the URL of the page into the w3.org validator.

Alternately, if you're using FF with the web developer tools installed, you should have a "Validate Local HTML" option in the Tools ---> Web Developer ---> Tools menu (or Command-Shift-A on Mac OS).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.