[Phpwm] subdomains & includes

Phil Beynon phil at infolinkelectronics.co.uk
Tue Jan 23 23:49:08 GMT 2007


This is odd and perplexing.....

I've got a subdomain site set up which has got a path to a config file which
contains things like database name, password etc. This is brought in as an
include() to the pages and works fine.
On the main site if I do the include with the full url it sees the file, if
I do echo "boo!"; in the page it does this, so I know it sees the file....
but its not giving up any of the variable values when they get asked for.

So:
subdomain.example.com
has:
include(/admin/config/siteconfig.php);
and that works just fine for seeing the database.

But
www.example.com
has:
include(http://subdomain.example.com/admin/configs/siteconfig.php);
(which can be see to be working from an echo to the page so its not an
incorrect path)
But isnt getting any of the the values of variables in siteconfig.php

I've tried using global() both within the siteconfig and in the page on the
main site thats called it in.

Both sites are on the same apache instance / server / IP address.

Regards,

Phil




More information about the Phpwm mailing list