Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Strict 1.0 Failed validation, 132 Errors
Old 01-24-2008, 08:27 PM Strict 1.0 Failed validation, 132 Errors
Junior Talker

Posts: 2
Trades: 0
Hi,

Can someone tell me how to fix a problem I am having (I am a newbie to PHP):

I am working on http://journalaccess.com and I am coming accross an issue where:

I use <?php require(); ?> to include my header however when I do this the index.php page shows the info from the header (<div class="h2"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:/) in the body of the index page, which shows as errors in strict 1.0 whenever I try to validate it. Should I even be using <?php require(); ?>, or should I use something else?

Help is appreciated. And if you would like to throw in some tips that would be great too, thanks!
yorsite is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-24-2008, 09:21 PM Re: Strict 1.0 Failed validation, 132 Errors
Skilled Talker

Posts: 52
Name: Dustin
Trades: 0
Sounds like you might be missing a < or a > somewhere if it is displaying the actual code in the body of your page.

There is nothing wrong with using <?php require('file.php'); ?> I use it more than just a few times on my pages. If you want to try something else though, try this one:

<!-- #include virtual="file.php" -->

I haven't used it in quite a while but as far as I know it does the exact same thing as phps include. The only thing is that if you use php's require() it will keep the rest of your script from executing if the require() fails to load, which can be a good thing depending on what type of script you have. Personally I would just stick with require().
__________________

Please login or register to view this content. Registration is FREE
TributeK is offline
Reply With Quote
View Public Profile
 
Old 01-25-2008, 11:19 AM Re: Strict 1.0 Failed validation, 132 Errors
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
<div class="h2"><!DOC... will always generate an error since NOTHING should appear before the doctype. Where is this div coming from?
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 01-28-2008, 03:37 PM Re: Strict 1.0 Failed validation, 132 Errors
futurevisions's Avatar
Super Talker

Posts: 102
Location: UK
Trades: 0
Looks to me like you have a doctype declaration INSIDE your header include file, and a couple of others by the look of it.

You ONLY need the doctype declaration at the top of your index file. You can delete the others.

Hope this helps!

Last edited by futurevisions; 01-28-2008 at 03:39 PM.. Reason: Extended
futurevisions is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Strict 1.0 Failed validation, 132 Errors
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35976 seconds with 12 queries