Hello everyone,
I'm up a proverbial creek without a proverbial paddle and need a
proverbial helping hand.
I use a little PHP template system that goes something like this [the
code has been simplified to illustrate the point, so don't fuss at me
Rudy because it doesn't have a doctype! :) ]:
TEMPLATE FILE (layout.php):
<html>
<head>
<title><?= $page_title;?></title>
</head>
<body><?= $content;?></body>
</html>
PAGE FILE (test.php):
<?
$page_title = "Here is the page title";
$rcontent = "Here is the insightful, astute and perceptive content";
include("layout.php");
?>
As you can obviously see, test.php uses layout.php as the template and
layout.php tells test.php where to put the stuff. So far, so good.
My problem is that I am using this method in a gargantuan site that has
many, many folders and subfolders. If the file is here:
"www.xyz.com/yes/no/maybeso/test.php" and the template file is here:
"www.xyz.com/layout.php", problems ensue and the page doesn't show
properly because layout.php isn't in test.php's directory.
The questions is, how do I edit " include("layout.php");" so that
test.php will properly find the template file no matter where test.php
is. Putting layout.php in all the folders is NOT an option! :)
Thanks in advance for the proverbial help!
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] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings or add a password:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ 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.