Jump to content


Photo

help seek


  • Please log in to reply
1 reply to this topic

#1 tauchai

tauchai
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 26 May 2006 - 02:26 AM

global $PHP_SELF;

$cookie_path = $PHP_SELF;
$cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
session_set_cookie_params(0, $cookie_path);

wat does it means? can anyone explain one line by line? thxs a lot!

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 26 May 2006 - 05:32 AM

It's just to set the session cookie's path.

Anyways, you should replace $PHP_SELF with $_SERVER['PHP_SELF'] (when you do this you can also remove the global $PHP_SELF) because what you are using rely on register_globals on.
~ D Kuang




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users