| | |
XHTML with PHP validation ???
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
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":
[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>[/PHP]
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":
[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>[/PHP]
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
•
•
Originally Posted by tgreer
Who says you can't validate? Just copy and paste the URL into the appropriate spot on the validator page.
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
•
•
Originally Posted by tgreer
Browse to your page. Select "View Source". Copy it all. Paste it into the appropriate spot on the validator page.
I tried using the "browse" button & uploaded the file, but sadly came across message saying:
Sorry, I am unable to validate this document because its content type is application/x-php, which is not currently supported by this service.
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
I still don't understand. The validator allows you to validate something you paste in, or a URL. In either case, PHP renders HTML. You shouldn't be pasting the PHP, you should be pasting the results of the PHP program.
To repeat:
Browse to your file. View Source. Copy. Paste.
To repeat:
Browse to your file. View Source. Copy. Paste.
Last edited by tgreer; Jul 6th, 2006 at 8:46 pm.
•
•
•
•
Originally Posted by tgreer
I still don't understand. The validator allows you to validate something you paste it, or a URL. In either case, PHP renders HTML. You shouldn't be pasting the PHP, you should be pasting the results of the PHP program.
To repeat:
Browse to your file. View Source. Copy. Paste.
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
•
•
Originally Posted by tgreer
I still don't understand. The validator allows you to validate something you paste in, or a URL. In either case, PHP renders HTML. You shouldn't be pasting the PHP, you should be pasting the results of the PHP program.
To repeat:
Browse to your file. View Source. Copy. Paste.
Does that mean Flash element DOES NOT get validated in XHTML ???
These are very basic errors, such as:
>> Line 10 column 31: there is no attribute "src".
<div id="centerTop"><embed src="welcome.swf" height="500" width="500"/></div>
>> Line 10 column 52: there is no attribute "height".
<div id="centerTop"><embed src="welcome.swf" height="500" width="500"/></div>
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
•
•
Originally Posted by tgreer
The "embed" element isn't within the XHTML specification. It's been replaced by "object".
I'm now left down to 2 (from originally 36 errors, mostly being flash based).
>> Line 60 column 218: there is no attribute "allowScriptAccess".
...er" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwa
>> Line 60 column 280: there is no attribute "pluginspage".
...ation/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashpl
What exactly these two "allowScriptAccess" and "pluginspage" do, since if it doesn't do much, I suppose getting rid of it (provided the flash element plays well in cross browser) would be an option ???
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
![]() |
Similar Threads
Other Threads in the HTML and CSS Forum
- Previous Thread: HTML CSS bullet style
- Next Thread: CSS Validation ???
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash font fonts form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






