Here's a twist on the subject

 $HTTP_TEMP_PATH_VARS = explode("/",$PATH_INFO);

 array_shift($HTTP_TEMP_PATH_VARS);
 reset($HTTP_TEMP_PATH_VARS);
 $HTTP_PATH_VARS = array();

 while( list($index,$key) = each($HTTP_TEMP_PATH_VARS) ) {
        list($index,$val) =  each($HTTP_TEMP_PATH_VARS);
        $val = urldecode($val);
    $HTTP_PATH_VARS[$key] = $val;
        $$key = $val;
 }


This'll do the same as Kevin suggested but you don't have to limit the # of
variables

Then modify ScreenURL function like so: (I've replaced SCREEN with SCN to
shorten the PATH_INFO)

 function screenURL($screen, $secure=FALSE, $extra='')
 {
  global $sid;
  global $UserInfo;

  if(USE_SSL AND $secure)
  {
   $URL = "https://";;
  }
  else
  {
   $URL = "http://";;
  }

  $URL .= SERVER_NAME . EXTERNAL_PATH . SCRIPT_NAME . "/SCN/$screen";

  if((!USE_COOKIES) OR (!COOKIE_FOUND))
  {
   $URL .= "/sid/$sid";
  }

  if(is_array($extra))
  {
   for(reset($extra); $key=key($extra); next($extra))
   {
    $URL .= "/$key/" . prepareText($extra[$key]);
   }
  }


  return($URL);
 }


I've used this on a number of larger sites and it works great. There is a
little glitch though, all image paths have to be: /image/image.gif instead
of image/image.gif

You don't have to use apache directives to make this work although you will
need apache to identify the $PATH_INFO variable.

ron


_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev

Reply via email to