include files out of the phpbb3 directory

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
numerical25
Registered User
Posts: 23
Joined: Sat Jul 05, 2008 5:52 am

include files out of the phpbb3 directory

Post by numerical25 » Tue Jul 08, 2008 12:05 am

Im trying to include some files that are located outside of the phpbb3 folder but for some reason phpbb3 believes that it is the root directory. phpbb3 folder is located in my my directory like this.

/mysite/phpbb3/

The file im trying to locate is in my root like this

/mysite/include.php

Where I am calling the include is in the index.php file located in the phpbb3 folder

/mysite/phpbb3/index.php

I tried calling the include like this

<!-- INCLUDE /mysite/include.php --> and <!-- INCLUDE mysite/include.php -->

doesnt work so i tried this


<!-- INCLUDE include.php --> and <!-- INCLUDE /include.php -->

php is telling me it cant find it but its there. how do i include files that are located somewhere besides the phpbb3 folder

(And yes I do have php coding enabled in the ACP)

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51785
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: include files out of the phpbb3 directory

Post by Brf » Tue Jul 08, 2008 12:16 am

Those includes are for HTML files.
PHP files are included using INCLUDEPHP and should be a relative path from the phpbb root folder.

numerical25
Registered User
Posts: 23
Joined: Sat Jul 05, 2008 5:52 am

Re: include files out of the phpbb3 directory

Post by numerical25 » Tue Jul 08, 2008 12:23 am

so are you saying
<!-- INCLUDEPHP ../../file.php -->

??

Something like that ??

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51785
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: include files out of the phpbb3 directory

Post by Brf » Tue Jul 08, 2008 12:26 am

I am thinking:
<!-- INCLUDEPHP ../file.php -->
If you are only going up one level.

Locked

Return to “[3.0.x] Support Forum”