View Single Post
Old 2006-11-15, 05:30 PM   #1
Jeremy
Remember to rebel against the authorities, kids!
 
Jeremy's Avatar
 
Join Date: Aug 2003
Location: AU
Posts: 406
Getting Relative PHP Includes to Work Locally.

Hmmmmmm this is a real teaser for me, even though I'm sure the answer is bllindingly simple!

I'm using WinXP Home, Apache/2.0.55 (Win32) PHP/5.1.4.

PHP & Apache seems to work fine on my PC with the exception of one annoying thing..... I can't get relative php includes to work if they reference root!

eg include ('incs/include.file') works fine locally but

include ('/incs/include.file') doesn't work, nor does ('proper/server/address/incs/include.file').

I've set Apache so that I can access the site locally as localhost:port/. I've got Alias to work so that a link with "/proper/server/address/" goes to the right place locally and gets served through localhost:port/.

I've added the localhost address to the include_path in php.ini, tried the physical hard drive address as well, tried just "/" as well...

I don't get an Apache Error, but get the php "failed opening" message.

I'm fast running out of ideas.... anybody else got any?
__________________
XXX Porno Hardcore
Jeremy is offline   Reply With Quote