Jump to content


Photo

XHTML validation of ".php" document ???


  • Please log in to reply
4 replies to this topic

#1 j4mes_bond25

j4mes_bond25
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 06 July 2006 - 02:35 PM

I normally use http://validator.w3.org/ 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":

<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>


#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 July 2006 - 02:40 PM

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

Ken

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 July 2006 - 03:38 PM

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.

#4 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 06 July 2006 - 03:41 PM

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.


...unless you have you ip address in there http://0.0.0.0:8080/...docs/my_website but it won't work with "localhost"

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 July 2006 - 04:24 PM

Umm, which I did menton:

... you cannot validate your php file if its on your local computer.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users