Old 03-06-2003, 16:13   #1 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
php includes and relative paths

Hi all

There's a way of specifying the relative path of php includes so it doesn't matter what directory they're in. Does that make sense?

It's to do with either php.ini or htaccess. Anyone know?

TIA

Jamie
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 06-06-2003, 09:20   #2 (permalink)
g-a-t-e
Registered User
 
g-a-t-e's Avatar
 
Join Date: Jun 2003
Location: somewhere between enlightenment and stupidity
Posts: 34
Within you htaccess you can do something along the lines of

php_value include_path .:/path/that/you/want/to/use

im not sure on the exact apache declaration for either side of the syntax above.
  Reply With Quote
Old 21-11-2003, 18:28   #3 (permalink)
Sharif
Registered User
 
Join Date: May 2003
Posts: 53
Why not use a variable that specifies the root of the files, and then use that?

$location = 'path/to/your/files/';
include($location . 'file.php');
  Reply With Quote
Old 21-11-2003, 18:29   #4 (permalink)
Sharif
Registered User
 
Join Date: May 2003
Posts: 53
Jeez, I gotta start reading the post dates...
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8