Thanks Joseph for the reply.
Are you saying that I should do the following:
$thing = include $_SERVER['DOCUMENT_ROOT'].
'/if folder/if folder/filename.php';
Thanks again,
Will
Professional Graphics Artist
Certified Web Designer (BCIP)
Stewart and Company
--
www.stewartandcompany.net
[EMAIL PROTECTED]
--
W: 304.550.2687
Rt. 1 Box 364
Buffalo, WV
25033
-----Original Message-----
From: Joseph Harris [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 16, 2004 5:06 PM
To: [EMAIL PROTECTED]
Subject: [wdvltalk] Re: Calling all PHP gurus
Will,
I'm not clever, certainly not guru, but this is the format I've been
instructed
include $_SERVER['DOCUMENT_ROOT'].
'/if folder/if folder/filename.php';
And isn't include(); better than include'';?
Is that of use?
Joseph Harris
I am assuming $thing refers to the same thing in both cases
> Okay you PHP brainiacs,
>
> I know enough PHP to endanger the lives of those around me, so I'm
> really counting on your help!
>
> I have a template file that I use (layout.php) in a site I'm
designing.
> I want to include a file into it, but I can't figure out how to do it
> with the layout I'm using. If you check the code below (it's a
> simplified version), you will probably understand better.
>
> I tried:
>
> $thing = include 'file.php';
>
> but that didn't work.
>
> Any help is appreciated!
>
> === layout.php ===
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" />
> <head>
>
> <title><?= $page_title;?></title>
> </head>
>
> <body>
>
>
> <?= $content;?>
>
> <p>
> <?= $thing;?>
> </p>
>
> </body>
> </html>
>
> === filename.php ===
>
> <?
>
> $page_title = "This is the title";
>
> $content = "This is where the content goes";
>
> $thing = "Here is where I want the include";
>
> include("layout.php");
> ?>
>
>
> Thanks!
>
> Will
>
> Professional Graphics Artist
> Certified Web Designer (BCIP)
>
> Stewart and Company
> --
> www.stewartandcompany.net
> [EMAIL PROTECTED]
> --
> W: 304.550.2687
>
> Rt. 1 Box 364
> Buffalo, WV
> 25033
>
>
> ____ . The WDVL Discussion List from WDVL.COM . ____
> To Join wdvltalk, Send An Email To:
mailto:[EMAIL PROTECTED]
> Send Your Posts To: [EMAIL PROTECTED]
> To set a personal password send an email to [EMAIL PROTECTED] with
the
words: "set WDVLTALK pw=yourpassword" in the body of the email.
> To change subscription settings to the wdvltalk digest version:
> http://wdvl.internet.com/WDVL/Forum/#sub
>
> ________________ http://www.wdvl.com _______________________
>
> You are currently subscribed to wdvltalk as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
> To unsubscribe via postal mail, please contact us at:
> Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
>
> Please include the email address which you have been contacted with.
>
>
____ . The WDVL Discussion List from WDVL.COM . ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with
the words: "set WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.