Re: How do you read one of these parameters?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



or, you could use a 404-errorHandler, and have it parse the URL that caused it couldn't find ;) (that's what I use occasionally)


Richard Lynch wrote:
Brian Dunning wrote:

I see URLs formatted like this:

  http://tinyurl.com/xyz

How do you read that "xyz," since there's no "/?x=" preceding it? Is it
not a get parameter?


If you can't do mod_rewrite you can use:
http://tinyurl.com/index.php/xyz
with:

<?php echo $_SERVER['PATH_INFO'];?>

I use it all the time, especially to pass parameters to dynamic images and
PDFs so that Microsoft Internet Explorer (various versions) can't screw
up.

 BAD: http://example.com/dynamic_pdf.php?record_id=1
GOOD: http://example.com/dynamic_pdf.php/record_id=1/fool_ie.pdf


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux