Re: Re: SESSION and include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fredrik Tillman wrote:
PROBLEM SOLVED!

yeah! :-)

What I actually was including was a variable ($main) and since some my pages are called on from different pages in different folders what I actually did was seting $main to the full URL to the site (http://mysite.com/page.php) to avoid confusion. But when calling on a URL I guess PHP is set to drop $_SESSION variables...

php is capable of opening files on remote systems via http,
when you did:

require 'http://yourdomain.com/yourpage.php';

you actually made a seperate request to youre own webserver
which when it was processed obviously didn't have the session
cookie (as pArt of the request) that would cause the session
array to be initialized with the data you would expect.

go read up on the ini setting 'allow_url_fopen' for more info on this.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux