SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Include function not working
-
May 5, 2005, 14:17 #1
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Include function not working
I have the following include function:
<?php
include ('styling/brfooter.inc');
?>
in my file: file:///C:/Reactor/htdocs/BRH%20folder/BRH/index.html
Problem is, my "brfooter.inc" file is not appearing. The location of the "brfooter.inc" file is under file:///C:/Reactor/htdocs/BRH%20folder/BRH/styling/brfooter.inc (where Reactor/htdocs/ is the operating server on my machine.
Am I missing something on how to script the "brfooter.inc" file in my include script? I thought I had it right by the way I've been reading in books.
Any help would be greatly appreciated!
Toad78Last edited by toad78; May 5, 2005 at 14:18. Reason: forgot something
-
May 5, 2005, 14:28 #2
- Join Date
- Oct 2001
- Location
- Its all about location
- Posts
- 652
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You need to change the extension on your index.html page to be index.php. Otherwise, the web server won't know that you are processing php and need to include a file.
-
May 5, 2005, 17:19 #3
- Join Date
- Oct 2003
- Location
- Your Monitor
- Posts
- 1,146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As krayzie put you have to have a .php extension on your file.
You do have a local server setup with PHP on your machine right? If not, you won't see anything where the PHP code should execute.
I can't find it now but there is a thread going on now about different applications that will install Apache, PHP, MySQL on your local machine to set up a 'localhost'.
If you are unable to find it, I've always had luck with AppServ.
-
May 5, 2005, 17:43 #4
- Join Date
- Apr 2005
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I can't find it now but there is a thread going on now about different applications that will install Apache, PHP, MySQL on your local machine to set up a 'localhost'.
If you are unable to find it, I've always had luck with AppServ.
-
May 6, 2005, 13:29 #5
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by krayziepjf
Thank you...I'll try that right away!
Toad78
-
May 6, 2005, 13:31 #6
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by k0ng
Toad78
-
May 6, 2005, 14:39 #7
- Join Date
- Feb 2005
- Posts
- 134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, WAMP5 really rocks.
It's my prefered offline server.
BTW, why don't you try using the function require_once().
-
May 6, 2005, 15:08 #8
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by SUPERUSER
Toad78
-
May 6, 2005, 15:10 #9
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by krayziepjf
Toad78
-
May 7, 2005, 14:39 #10
- Join Date
- Feb 2005
- Location
- A box
- Posts
- 516
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
For those of you who want all of it, GD, a mailer, an ftp server, php 4 and 5, apache 2, mysql, all of it, get XAMPP
It also has SSL and tons of cool installed stuff, best out of the ones I've tried, and I tried WAMP and AppServ.<(^.^<) \(^.^\) (^.^) (/^.^)/ (>^.^)>
Core 2 Duo E8400 clocked @ 3.375GHz, 2x2GB 800MHz DDR2 RAM
5x SATA drives totalling 2.5TB, 7900GS KO, 6600GT
Bookmarks