[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] What am I missing here?
From:       Jay Ess <lists () netrogenic ! com>
Date:       2010-06-28 21:42:09
Message-ID: 4C291731.40405 () netrogenic ! com
[Download RAW message or body]

Rick Dwyer wrote:
> Hello List.
>
> I am completely at a loss for why the line of code below returns the 
> desired value:
>
> $PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRI
> PT_NAME']), strlen($_SERVER['REQUEST_URI']));
>
> BUT, putting the same line of code on 1 line fails to return anything:
>
> $PATH_INFO= 
> substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRIPT_NAME']), 
> strlen($_SERVER['REQUEST_URI']));
strlen counts the newline so probably should you put a +1.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic