j4mes_bond25 Posted July 6, 2006 Share Posted July 6, 2006 I normally use [url=http://validator.w3.org/]http://validator.w3.org/[/url] to validation my XHTML, however, in my current project, I've used PHP as well & all my files has ".php" extention so can't use this site to validation my XHTML codes. Mainly the PHP I've used is for the "include" function to share navigation, header, footer, etc. across all the pages.How do I go about validating these pages (having extention ".php" but has "xhtml" codes within).One of the example is of Privacy page i.e. "Privacy.php": [code=php:0]<div id="header"><?php include("inc/header.inc");?> </div><?php include("inc/head.inc");?><body><?php include("inc/banner_topmenu.inc");?><?php include("inc/left_right_content.inc");?><div id="centerContent"><p class="first-letter">This privacy statement discloses the privacy policies of All Inclusive Web Design. It applies solely to this website itself along with its content <span class="italic">(text and images)</span>. All Inclusive Web Design is committed to respecting your privacy. We have structured our website so that, you can visit it without identifying yourself or revealing any personal information.</p><p>Under the Data Protection Act 1998, we have a legal duty to protect any personal information we collect from you. We do not pass on your details to any third party. Your visit to All Inclusive Web Design is anonymous and hence no personal information is recorded or gathered, unless when you fill in the contact form to contact us.</p><p>If you do not wish to be contacted using any of the details you provide us through the Contact form, please say so when sending the form.</p></div><?php include("inc/footer.inc");?></body></html>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/ Share on other sites More sharing options...
kenrbnsn Posted July 6, 2006 Share Posted July 6, 2006 You have to display the page on a browser, do a "show source", copy the shown source and validate that.Ken Quote Link to comment https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/#findComment-53891 Share on other sites More sharing options...
wildteen88 Posted July 6, 2006 Share Posted July 6, 2006 You shoud still be able to pass the php file through the validatar, but the php file mustbe hosted on your site in order to validate it, you cannot validate your php file if its on your local computer. Quote Link to comment https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/#findComment-53922 Share on other sites More sharing options...
cmgmyr Posted July 6, 2006 Share Posted July 6, 2006 [quote author=wildteen88 link=topic=99660.msg392582#msg392582 date=1152200333]You shoud still be able to pass the php file through the validatar, but the php file mustbe hosted on your site in order to validate it, you cannot validate your php file if its on your local computer.[/quote]...unless you have you ip address in there http://0.0.0.0:8080/www/htdocs/my_website but it won't work with "localhost" Quote Link to comment https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/#findComment-53927 Share on other sites More sharing options...
wildteen88 Posted July 6, 2006 Share Posted July 6, 2006 Umm, which I did menton:[quote]... you cannot validate your php file if its on your local computer.[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/#findComment-53962 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.