Re: Transparent session handling

From: Date: Fri, 09 Jun 2000 01:08:42 +0000
Subject: Re: Transparent session handling
References: 1  Groups: php.dev php.general 
Request: Send a blank email to php-dev+get-20627@lists.php.net to get a copy of this message
On Thu, 8 Jun 2000, Peter Kovacs wrote: > Transparent session doesn't work with urls like: > > http://servername/<? echo $pagename ?> > > It produces: http://servername/?sid=something$pagename > instead of : http://servername/$pagename?sid=something > > I desperately need this fixed and I am will do it myself if somebody could > just point me in the right direction and give a brief explanation of how > the output system works. The problem here is that the URL scanner is context free. In non-buffered mode, PHP outputs data as often as possible. To a human, this string looks like some HTML with PHP embedded: <a href="<? print_url(); ?>"> But the URL scanner will be triggered three times: <a href=" http://someurl/doc.php "> The fix for this is to make the URL scanner combine URLs. One workaround is to enable output buffering or to write references this way: echo "<a href=\"".get_url()."\">"; - Sascha

« previous php.dev (#20627) next »