944,147 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jul 6th, 2006
0

XHTML with PHP validation ???

Expand Post »
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]
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

Who says you can't validate? Just copy and paste the URL into the appropriate spot on the validator page.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

Quote 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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

Browse to your page. Select "View Source". Copy it all. Paste it into the appropriate spot on the validator page.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

Quote 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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

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.
Last edited by tgreer; Jul 6th, 2006 at 8:46 pm.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 6th, 2006
0

Re: XHTML with PHP validation ???

Quote 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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006
Jul 7th, 2006
0

Re: XHTML with PHP validation ???

Quote 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>
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006
Jul 7th, 2006
0

Re: XHTML with PHP validation ???

The "embed" element isn't within the XHTML specification. It's been replaced by "object".
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 7th, 2006
0

Re: XHTML with PHP validation ???

Quote 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 ???
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
j4mes_bond25 is offline Offline
90 posts
since Jan 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: HTML CSS bullet style
Next Thread in HTML and CSS Forum Timeline: CSS Validation ???





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC