Re: Problem getting included source code to work.
- From: "dimo414" <dimo414@xxxxxxxxx>
- Date: 29 May 2006 13:57:22 -0700
Yes, when include (and require) are run, the included text is parsed
like HTML, so you need to place it inside another <?php ....... ?> set.
As I understand your request, you want to keep everything separate,
which is easy enough to do:
In the file you want the public to see, first include your php code
(this included file can also have other included files in it too)
then:
<html>
<head>
<title>,,,,,,</title>
<OTHER HEAD FORMATTING>
</head>
<body>
<?php include('header.inc') ?> <-- This is your header html file, all
the content that will always be the same on every page.
TEXT, IMGS, WHATEVER <-- This is your actual content. if you want,
you could include this from a file as well.
<?php include('footer.inc') ?> <-- This is your footer html file, just
like the header, exept all the code that goes below the content.
</body>
</html>
Is that what you were asking?
.
- Follow-Ups:
- Re: Problem getting included source code to work.
- From: kenoli
- Re: Problem getting included source code to work.
- References:
- Problem getting included source code to work.
- From: kenoli
- Re: Problem getting included source code to work.
- From: MS
- Re: Problem getting included source code to work.
- From: kenoli
- Problem getting included source code to work.
- Prev by Date: Re: WTF: Cheap but reliable coder
- Next by Date: Re: No Framesets allowed
- Previous by thread: Re: Problem getting included source code to work.
- Next by thread: Re: Problem getting included source code to work.
- Index(es):
Relevant Pages
|