You are here: Re: passing the '#' character « PHP Language « IT news, forums, messages
Re: passing the '#' character

Posted by Thomas Mlynarczyk on 12/25/06 22:56

Also sprach Peter:

> For years I have used a '#' character in certain strings in an
> application but now I find I need to pass those strings to a php
> script. #characters seem to cut off strings
> e.g. www.url.com/script.php?text=mytext#yourtext
> and $text will only contain mytext
> #yourtext is gone

In your example, #yourtext would mean a fragment identifier (an anchor
within the document), which is not part of the URL (only the browser needs
it to know how far to scroll down when displaying the page).

You could escape the # (%35 or something like that) and PHP has functions to
do the encoding and decoding. See
http://de.php.net/manual/en/function.urlencode.php and related functions.

Greetings,
Thomas

 

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

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