•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,996 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,935 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2575 | Replies: 11 | Solved
![]() |
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
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 ;)
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by tgreer
Who says you can't validate? Just copy and paste the URL into the appropriate spot on the validator page.
I wish to validate one page at a time, I'm afraid, so I can understand what's happening in each line.
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
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'm afraid, I already tried doing so, but becase of "php's include" file, having "header" elsewhere & "body" tag elsewhere, etc. it continues to show the errors.
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 ;)
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 7:46 pm.
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
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.
Oh OK, will give it a go tomorrow morning now. It's time to doze off now before my brain cells stops working. Thanks.
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
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.
Everything works OK, except that I've certain "Flash .swf" files and am getting errors in "embed" code.
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 ;)
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by tgreer
The "embed" element isn't within the XHTML specification. It's been replaced by "object".
As I kicked-off with solving each error, there were many flash codes that weren't of XHTML standard. I managed to get it sorted out by researching over Internet.
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 ;)
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the HTML and CSS Forum
- Previous Thread: HTML CSS bullet style
- Next Thread: CSS Validation ???



Linear Mode