Forum Moderators: coopster

Message Too Old, No Replies

It doesnt find the page

Used php include, now cant validate

         

james gulliver

2:34 pm on Oct 20, 2003 (gmt 0)

10+ Year Member



I have put the body tag into a php include to create an easily updated frame for all pages. Now when i try and validate using search engine world tools it doesnt return anything. any ideas?

ergophobe

4:32 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It has nothing to do with putting the body tag into a php include. It must be because you now have some syntax error (missing quote?).

Have you done a "view source" and then tried to validate that?

Tom

ergophobe

4:34 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




validate using search engine world tools

What tools are those? Have you tried using the W3C validator? That's your most sure bet.

Tom

james gulliver

5:09 pm on Oct 20, 2003 (gmt 0)

10+ Year Member



yes i have copied the source and then tried to validate using the w3c tools provided on 3ws searchengineworld.com no luck.its doesnt appear to have anything wrong with it. is there something i can use that will tag the text so i can see the exact location of the error

MonkeeSage

9:02 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mabye I'm dense. but how exactly does one validate PHP with an HTML validator?

Jordan

bcolflesh

9:03 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes i have copied the source...

You want to validate the output - not the source.

ergophobe

9:21 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



James,

Let's go back the beginning to see if I understand.

1. You bring up the page and then copy the page source (which, yes bcolflesh, is the php output, but I think James means the source of the html page b/c he was responding to an earlier question of mine about how it looked in "view source").

2. It validates fine, but nothing shows up in the browser (appears to be an empty page).

3. The page looked fine orginally, but since splitting it into PHP includes, it doesn't display.

If I have that right, I would look for things like unmatched tags and quotes in the html source (aka the php output), though it seems like that stuff would create validation problems.

BTW - I tried the SEW validator on a couple of pages - one that I knew woudl validate and one that I knew wouldn't. I don't get any meesages really other than the size of the page. Use the W3C validator or install SP on your own computer and validate that way.

Tom

coopster

9:23 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



James, I believe ergophobe was referring to the HTML source that can be viewed after it has been generated by PHP and sent back to the requesting user agent. For example, you click a link, the PHP processor renders the output in the buffer and upon script completion sends the code back to the user agent. Then you can click on "View Source" from within the user agent and Save the file to local hard disk to use for validation as described in the post.
<edit>ergophobe already responded<edit>

ergophobe

9:28 pm on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




is there something i can use that will tag the text so i can see the exact location of the error

Sorry, forgot about that. Yes, just put "echo" statements in your code. For example, you can put something like
echo "open top.include.php";
...
echo "close top.include.php";

at the top and bottom of the file top.include.php, but in principle if all you are doing is making includes, it should be easy to see what's coming from where. Perhaps I misunderstood your question again.

Also, an editor with syntax highlighting might be a big help if you are quoting something you don't think you are quoting.

Tom