PATH_INFO and trans-sid and output buffering doesnt work...
| From: | Chris Lee | Date: | Tue, 24 Apr 2001 15:56:31 +0000 |
| Subject: | PATH_INFO and trans-sid and output buffering doesnt work... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50133@lists.php.net to get a copy of this message | ||
<?php
if (isset($PATH_INFO))
{
$var = explode('/', $PATH_INFO);
for($c = 1; $c < count($var); $c += 2)
{
$$var[$c] = $var[$c + 1];
$HTTP_GET_VARS[$var[$c]] = $var[$c + 1];
}
}
function fix_session($output)
{
global $SID;
$o_sid = '?'. $SID;
$n_sid = '/'. str_replace('=', '/', $SID);
$output = substr_count($output, $o_sid) .'<br>'. str_replace($o_sid, $n_sid,
$output);
return $output;
}
ob_start('fix_session');
?>
I am prepending this file and Im not getting the results I want. the substr_count is there just to
show me how many instances its going to replace. well the answer is 11, there are 11 hard coded
link.php?$SID and the rest (aprox 20) are all left upto trans-sid. they do not get replaced, the
other hardcoded 11 do though as expected. how can I convert the trans-sid ones? without hardcoding
every single link... ? thats alot of links and forms I have to replace....
--
Chris Lee
lee@mediawaveonline.com