Page 1 of 1

include file from another subdomain

Posted: Tue Jun 07, 2005 11:47 am
by anjanesh
I have a.php in main domain of httpdocs and b.php in a subdomain on the same server - I want to include a.php in b.php but it just doesnt include - I tried relative and document root paths but its not including.

In the subdomain file I gave
include_once ("../../../httpdocs/xxx.php");
to include a file from the main domain but thats isnt working.

Any way to get this done ?

Thanks

Posted: Tue Jun 07, 2005 3:20 pm
by Syranide
if you can open it, include can include it... if you cannot open it... you cannot include it, the simple rules of include. make sure it is readable first.

and please try to be more precise with your tries, it's obvious you aren't trying too hard, alternatively not describing much at all of what goes wrong. include not working could be virtually anything, from a broken php, no file, no rights, could actually be working as far as I can tell.

Posted: Wed Jun 08, 2005 12:30 am
by anjanesh
I tried a lot - the path is correct and the file exists - Im just testing it.
It seems I cant access main domain's file from a sub-domain. I'll need to check the permissions I guess.