Richard Lynch wrote:
WILD GUESS Search on php.net for __autoload I think that will let you figure out a way to get the auto_start session to automatically load your .class.php files, when it needs them.
Nice idea, unfortunately it doesn't work that way. In order to have the __autoload function work properly for session'd objects it needs to be declared before the session is started. AFAIK when auto_start is on the session is started before any PHP is evaluated. I had to shift one of my frameworks around so that the __autoload was declared before session_start was called.
I think Jochem may be on to something with the idea of using auto_prepend_file but I can't say for certain whether this is done before or after the auto_start. If it is before then you could declare the __autoload function in the prepended file and it should work.
-Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php