Stupid PHP Question

RJM62

Touchdown! Greaser!
Joined
Jun 15, 2007
Messages
13,157
Location
Upstate New York
Display Name

Display name:
Geek on the Hill
If two PHP files are referenced sequentially by includes, and each file does nothing but generate HTML for a portion of a Web page, is what the browser sees seamless?

I had a situation earlier today in which IE was rendering what should have been the left column, on the right of the container. To correct it, all I did was cut and paste two < /div > tags from the end of one included file to the beginning of the next included file.

That makes no sense to me. Isn't what the browser sees seamless from one include to the next?

-Rich
 
The browser never sees the includes. Everything is parsed and the only thing that gets to the browser is the output of the PHP which should, hopefully, be in a valid format the browser recognises (HTML, javascript, etc).

Something had to have been different with your change. View the page, save the source from your browser, make your fix and do the same. Diff those two files.
 
The browser never sees the includes. Everything is parsed and the only thing that gets to the browser is the output of the PHP which should, hopefully, be in a valid format the browser recognises (HTML, javascript, etc).

That much I knew, but thanks.

Something had to have been different with your change. View the page, save the source from your browser, make your fix and do the same. Diff those two files.

That's what I wound up doing, and it worked correctly both ways this time. Probably I had an extra DIV tag in there that I fixed without thinking about it when I made the paste, because I can only reproduce the error by inserting an extra DIV tag on either page.

Thanks again, Jesse.

-Rich
 
Back
Top