Results 1 to 8 of 8
Thread: php question
-
10-25-2005, 07:47 PM #1WHT Addict
- Join Date
- Apr 2002
- Posts
- 149
php question
hello all,
ok, first go to http://www.inkerrville.com , i made that site using php and i basically have made my site a template, so i add headerik.php, leftside.php, my html for the page and then i add my footer.php last.
my problem is this: i'm trying to add another level of pages on my site, but for some reason it's not working with my templated php pages. if you go to http://www.inkerrville.com/oldweb/testing.php you'll see what i'm talking about. my php coding is: <?php
include $_SERVER['DOCUMENT_ROOT']."/headerik.php";
?>, should i be adding something in the file name???
i hope i'm explaining myself for you to understand. thanks for your help.
spiderfine
-
10-25-2005, 07:54 PM #2Junior Guru Wannabe
- Join Date
- Jun 2005
- Posts
- 49
Your css file has a relative path in the include file. It is looking for http://www.inkerrville.com/oldweb/custom.css which does not exist. Try using an absolute path for it ie. http://www.inkerrville.com/custom.css.
-
10-25-2005, 10:30 PM #3WHT Addict
- Join Date
- Apr 2002
- Posts
- 149
???
i'm sorry i don't follow
spiderfine
-
10-25-2005, 11:00 PM #4Junior Guru Wannabe
- Join Date
- Jun 2005
- Posts
- 49
I imagine your include file has a line that looks like this in it:
PHP Code:<link href="custom.css" rel="stylesheet" type="text/css">
Change it to:
PHP Code:<link href="/custom.css" rel="stylesheet" type="text/css">
All your links will probably need to be changed in the include file to be absolute paths too.
so href="aboutus.php" becomes href="/aboutus.php"
-
10-26-2005, 12:01 AM #5Junior Guru Wannabe
- Join Date
- Sep 2003
- Location
- USA
- Posts
- 64
<?php include('filename.php'); ?>
AIM: GopherDesign
ICQ: 39 401 865
WWW: http://www.gopherdesign.com
WWW: http://www.gopherwebhosting.com
-
10-26-2005, 08:36 AM #6WHT Addict
- Join Date
- Apr 2002
- Posts
- 149
thank you
thanx baumer1122 for being a little bit more clear, it helped. wow, i'm still amazed at the power of a dash (/).
thank you again.
spiderfine
-
10-26-2005, 09:28 AM #7Junior Guru Wannabe
- Join Date
- Jun 2005
- Posts
- 49
That's a slash
This is a dash -
Welcome to the wonderful world of web programming
-
10-28-2005, 09:23 AM #8WHT Addict
- Join Date
- Apr 2002
- Posts
- 149
my bad
that is too funny - (dash) duh!(exclamation point)
lol
spiderfine