FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » when incuding a page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: when incuding a page [message #184117 is a reply to message #184111] Fri, 06 December 2013 20:15 Go to previous messageGo to previous message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma:
Member
On Fri, 6 Dec 2013 12:05:46 -0500, richard <noreply(at)example(dot)com>
wrote:

> <?php inlcude "page.html" ?>
>
> Should the include page be a complete page with headers or not?
>
> The validator throws a hissy fit when doing so.
>
> If not, then how does one properly include the stuff for that page?
> Such as CSS or javascript.

include inserts the contents of a file. That can be a whole html page
or a fragment of code.

Think of include as exactly the same as manually copy-and-pasting the
contents of the file.

So, for instance, if your page already has a <head> section before the
include, then you probably do not want to have a <head> section in the
included file. If you are including php code inside a section of php
code, then you do not need <?php....?> in the included file. But if it
is being inserted into the middle of html then you do need those.

Again, just think of it as: include is just copy-and-pasting the
contents of a file.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: working model of the latest project
Next Topic: Include gives warning
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 01:04:15 GMT 2024

Total time taken to generate the page: 0.04363 seconds