Changeset 1443 for branches/branch-1_6
- Timestamp:
- Jul 8, 2006, 11:31:09 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_6/include/functions_session.inc.php
r1429 r1443 85 85 function cookie_path() 86 86 { 87 if ( isset($_SERVER['REDIRECT_URL']) ) 87 if ( isset($_SERVER['REDIRECT_SCRIPT_NAME']) and 88 !empty($_SERVER['REDIRECT_SCRIPT_NAME']) ) 89 { 90 $scr = $_SERVER['REDIRECT_SCRIPT_NAME']; 91 } 92 else if ( isset($_SERVER['REDIRECT_URL']) ) 88 93 { // mod_rewrite is activated for upper level directories. we must set the 89 94 // cookie to the path shown in the browser otherwise it will be discarded. … … 109 114 $scr = $_SERVER['SCRIPT_NAME']; 110 115 } 111 return substr($scr,0,strrpos( $scr,'/')); 116 $scr = substr($scr,0,strrpos( $scr,'/')); 117 // add a trailing '/' if needed 118 return ($scr{strlen($scr)-1} == '/') ? $scr : $scr . '/'; 112 119 } 113 120
Note: See TracChangeset
for help on using the changeset viewer.