PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
andylyon87
Forum Contributor
Posts: 168 Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee
Post
by andylyon87 » Mon Jun 14, 2004 7:18 am
to include a file that is one folder back I would use
1. їcode]include("../review.php");ї/code]
or
2. їcode]include("\..\review.php");ї/code]
3. їcode]include("..\review.php");ї/code]
4. їcode]include("/../review.php");ї/code]
redmonkey
Forum Regular
Posts: 836 Joined: Thu Dec 18, 2003 3:58 pm
Post
by redmonkey » Mon Jun 14, 2004 7:41 am
In the time it has taken you to login here and type that message you could have tried each one for yourself.
Why don't you 'suck it and see'.
patrikG
DevNet Master
Posts: 4235 Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK
Post
by patrikG » Mon Jun 14, 2004 7:45 am
under Linux it's 1
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jun 14, 2004 11:21 am
under windows it's generally 1 too.
andylyon87
Forum Contributor
Posts: 168 Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee
Post
by andylyon87 » Mon Jun 14, 2004 1:49 pm
thats the prob you see, that isn't working
andylyon87
Forum Contributor
Posts: 168 Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee
Post
by andylyon87 » Mon Jun 14, 2004 1:58 pm
Code: Select all
Warning: Failed opening 'kite_index2.php' for inclusion (include_path='.;C:\Program Files\EasyPHP\php\pear'') in c:\program files\easyphp\www\kite_site\php\form_data\kite\mac\mac_index.php on line 8
when I use no.1 above it just shows this
I use
Which shows the above error.
I just thought this would be easier for me in the long run.
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Mon Jun 14, 2004 1:59 pm
Post your directory structure (and the name of the file this include line is in) ?
andylyon87
Forum Contributor
Posts: 168 Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee
Post
by andylyon87 » Mon Jun 14, 2004 2:39 pm
thanks mate but have after a few too many hours pondering finally sorted it, I had to includ the full root (not normally like this but its the way my nav works.