Current location: Hot Scripts Forums » Programming Languages » PHP » PHP Include


PHP Include

Reply
  #1 (permalink)  
Old 08-31-10, 01:29 PM
gocondo11 gocondo11 is offline
New Member
 
Join Date: Aug 2010
Location: TORONTO
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Include

I wrote my website in PHP with Eclipse. My main page index.php uses the INCLUDE statement in order to display the sidebar and other part of the page, because these parts are also used by other pages.

My problem is that if I add the "<!DOCTYPE html PUBLIC..." to each include file, I receive error when validating my index.php because it finds several "<!DOCTYPE html PUBLIC..." inside the page.

But if I remove this "<!DOCTYPE html PUBLIC..." line from all include files, then Eclipse cannot validate my files as HTML.

Any idea how to solve this problem? You can check my website below.

GO CONDO TORONTO
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-01-10, 11:22 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
Are you sure Eclipse doesn't validate html when no doctype is included? I use the same principle (header, footer and content that is included), and I use Eclipse as well, but my html is still validated.

What plugin are you using for PHP in Eclipse?
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-02-10, 10:38 AM
gocondo11 gocondo11 is offline
New Member
 
Join Date: Aug 2010
Location: TORONTO
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
I downloaded the standard Eclipse package for PHP...no idea which plug-in I'm using.

I use XHTML. You are right, Eclipse will validate it as html, but again mine is XHTML. For example break in html is <br> while in XHTML is <br/>. So when I use <br> in my XHTML, I do not receive any error from Ecilpse.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-02-10, 08:26 PM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
I'm using PDT (PHP Development Tools on Eclipse Galileo), I have the WTP (Web Tools Platform) feature installed as well for debugging xml, xsl, javascript and html.

I tried what you pointed out as an error, and I have exactly the same problem. The only advantage (but maybe you have this as well) I have is that my editor automatically closes my tags in the XHTML way. So even when I type <br> it will write <br></br>, so there's no problem with the validation.

If you really want a fix for this, I'd try googling first, and if you can't find anything, maybe you could suggest this as a new feature for a future release of the package
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
doctype, include, php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sports Pick Em racingboy20 Script Requests 3 06-18-10 04:12 AM
PHP include in a phpBB template ruteckycs PHP 1 10-01-09 09:58 PM
PHP Programmers India - PHP Developers India - PHP Web Developers - Hire PHP Programmers jaysmith2110 PHP 0 03-18-09 01:06 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM
Include asp-generated html in php rancor PHP 2 08-05-03 04:03 AM


All times are GMT -5. The time now is 12:27 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.