Jump to content

Recommended Posts

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]
Link to comment
https://forums.phpfreaks.com/topic/13848-xhtml-validation-of-php-document/
Share on other sites

[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"
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.