RE: [PHP] include() from another sub-domain
| From: | Brad Dameron | Date: | Mon, 19 Aug 2002 21:08:49 +0000 |
| Subject: | RE: [PHP] include() from another sub-domain | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113262@lists.php.net to get a copy of this message | ||
What I would do is change the include filename to something like
functions.inc like I do. This way the server won't try and run it for you.
---
Brad Dameron Network Account Executive
TSCNet Inc. www.tscnet.com
Silverdale, WA. 1-888-8TSCNET
> -----Original Message-----
> From: Greg Macek [mailto:it-guy@mrichi.com]
> Sent: Monday, August 19, 2002 12:29 PM
> To: php-general@lists.php.net
> Subject: [PHP] include() from another sub-domain
>
>
> Hello,
>
> I've searched the list and the manual and am still a bit confused.
> Here's what I'd like to do. We have a bunch of internal sites that all
> use the same username/password. One is already setup with a function to
> authenticate this to a database. However, each login page is coming from
> a different sub-domain, such as site1.mydomain.com. The login functions
> resides in a PHP file on site2.mydomain.com. So it does this:
>
> <?
> // This page on site1.mydomain.com
>
> include ("http://site2.mydomain.com/functions.php");
>
> if (loginUser($username,$password)) {
> // do stuff here
> // redirect
> }
> else { ... }
>
> ?>
>
> Right now my local script doesn't find the function I'm trying to use.
> What am I missing here? Is it not possible to include a php file (and
> its functions and variables) across domains?
>
> - Greg
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>