Jump to content

Archived

This topic is now archived and is closed to further replies.

j4mes_bond25

XHTML validation of ".php" document ???

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]

Share this post


Link to post
Share on other sites
You have to display the page on a browser, do a "show source", copy the shown source and validate that.

Ken

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites
Umm, which I did menton:
[quote]... you cannot validate your php file if its on your local computer.[/quote]

Share this post


Link to post
Share on other sites

×

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.