|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-08-06 07:14 UTC] evgen at unicon dot ru
PHP stops embeding the session id into URLs after calling virtual().
Example (switch off your cookies):
--------------------------------------
session_start();
session_register('count');
$count++;
echo $count."<br>";
<A HREF="example.php">link 1</A>
<?virtual("/virtual.html");?>
<A HREF="example.php">link 2</A>
---------------------------------------
First link will be example.php?PHPSESSID=7a85d47f8d5e7c96c579
but second link will be only example.php
If you comment virtual("/virtual.html") everithing will go on fine.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 00:00:01 2025 UTC |
There is no way to avoid this. Evaluate whether you actually need to use virtual. You could also do a readfile("http://server/page"); .. From php.net/virtual: " To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too."