This would return an image with the text after "image.php/" contained in it. I could not recall the name of this feature, so I made a work-around in PHP... <? function getPathVariables() { $sPathPS = $_SERVER[PHP_SELF]; $sPathFS = __FILE__; $aPathPS = array_reverse(explode("/", $sPathPS)); $aPathFS = array_reverse(explode("/", $sPathFS)); $aImageArgs = array(); $x = 0; while ( $aPathPS[$x] != $aPathFS[$x] && $aPathPS[$x] != $aPathFS[0] ) { array_unshift($aImageArgs, $aPathPS[$x]) ; $x++; } return $aImageArgs; } ?> This function will return an array containing each "/" delimited portion of the path after the script name itself. notes at arbee dot co dot uk 27-Jun-2005 10:14 Note that $_SERVER['QUERY_STRING'] behaves differently under IIS/Apache. In Apache (at least on Windows) it is ALWAYS set - if no query string was specified in the URL, $_SERVER['QUERY_STRING'] is initialised as an empty string. In IIS, if no query string is included in the URL, $_SERVER['QUERY_STRING'] is NOT SET, so trying to access it without checking for its existence will generate notices. koerner-familie at t-online dot de 21-Jun-2005 09:52 If you want to make a copy of $BLOBALS (e.g. to test whether which tariables were changed during script-runtime, <?php $___debug_var_dump = $GLOBALS; ?> will _NOT_ make a copy in PHP4 (tested with 4.3.11). Use <?php $___debug_var_dump = array_merge($GLOBALS, array()); ?> instead, but ONLY for testing purpose. Best regards, Peter purplebz at hotmail dot com 19-Jun-2005 04:35 How to get $_SERVER['REQUEST_URI'] on IIS (WinXP): if ( empty($_SERVER['REQUEST_URI']) ) { $arr = explode("/", $_SERVER['PHP_SELF']); $_SERVER['REQUEST_URI'] = $arr[count($arr)-1]; } xangelusx at hotmail dot com 14-Jun-2005 04:03 A note about the QUERY_STRING variable when using IIS: I have found that IIS does not handle large query strings gracefully when passed from PHP. In addition to truncating them to around 1024 kb, I have seen IIS actually add data from other server variables to the end of the truncated data. |