You are here: Re: [PHP] How do you read one of these parameters? « PHP « IT news, forums, messages
Re: [PHP] How do you read one of these parameters?

Posted by Richard Lynch on 02/11/05 18:45

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

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация