php-general Digest 16 Feb 2012 14:53:59 -0000 Issue 7691
Topics (messages 316614 through 316616):
pathinfo or other
316614 by: Donovan Brooke
316615 by: Elbert F
Re: Form Post to different domain
316616 by: Tedd Sperling
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hello,
What is the best way to get the /somedir/ values in the request URI?
I tried
$t_pathinfo = $_SERVER['PATH_INFO'];
but was given an error of undefined index. After looking at the docs, it
appears the error derives from something I may have to do in the .ini file.
However, is there a standard/better way of grabbing the info after the
host and before the query string.. perhaps 'SCRIPT_NAME'?
Thanks!
Donovan
--
D Brooke
--- End Message ---
--- Begin Message ---
SCRIPT_NAME is a server side path, try REQUEST_URI. This includes the query
string but it's easy to remove.
Elbert
http://swiftlet.org
On Thu, Feb 16, 2012 at 8:27 AM, Donovan Brooke <li...@euca.us> wrote:
> Hello,
>
> What is the best way to get the /somedir/ values in the request URI?
>
> I tried
> $t_pathinfo = $_SERVER['PATH_INFO'];
>
> but was given an error of undefined index. After looking at the docs, it
> appears the error derives from something I may have to do in the .ini file.
>
> However, is there a standard/better way of grabbing the info after the
> host and before the query string.. perhaps 'SCRIPT_NAME'?
>
> Thanks!
>
> Donovan
>
>
>
>
> --
> D Brooke
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Feb 14, 2012, at 1:39 PM, Daniel Brown wrote:
> On Tue, Feb 14, 2012 at 13:36, Rick Dwyer <rpdw...@earthlink.net> wrote:
>>
>> I only have access to domain B... the one receiving the Form POST.
>
> Then all you should need to do is:
>
> a.) Verify that Domain A is indeed pointing to Domain B, to
> the script you expect, as a POST request.
> b.) In the POST-receiving script on Domain B, try this simple snippet:
>
> <?php
> echo '<pre>'.PHP_EOL;
> var_dump($_POST);
> die('</pre>');
> ?>
>
> That should give you all data from the post request.
>
> --
> </Daniel P. Brown>
> Network Infrastructure Manager
> http://www.php.net/
Why the '.PHP_EOL' ?
I've never seen that before and looking through the PHP documentation doesn't
give me much.
Cheers,
tedd
_____________________
t...@sperling.com
http://sperling.com
--- End Message ---