By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,497 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,497 IT Pros & Developers. It's quick & easy.

The pound # in $_SERVER variables

P: n/a
(1) test.php?test_key=test_value

$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

(2) test.php?test_key=test_value#test_internal_sublink

$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

Questions
(1) What do you call a sublink with the pound (#) symbol?
(2) How do I get to the #test_internal_sublink?

--
Jim Carlock
Jun 30 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Jim Carlock wrote:
(1) What do you call a sublink with the pound (#) symbol?
A link with a fragment identifier.

http://www.w3.org/TR/html401/intro/i...l#fragment-uri
http://www.w3.org/TR/html401/struct/links.html#h-12.1.1
(2) How do I get to the #test_internal_sublink?
You don't. Webservers do not care about fragment URIs, and only buggy
browsers send that info th them.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

TAG! TAG! -¿Quién es?
Jun 30 '07 #2

P: n/a
(1) test.php?test_key=test+value

$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

(2) test.php?test_key=test+value#test_internal_sublink

$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

Questions
(1) What do you call a sublink with the pound (#) symbol?
(2) How do I get to the #test_internal_sublink?

--
Jim Carlock
Jun 30 '07 #3

P: n/a
Jim Carlock wrote:
(1) What do you call a sublink with the pound (#) symbol?

"Iván Sánchez Ortega" replied:
: A link with a fragment identifier.
:
: http://www.w3.org/TR/html401/intro/i...l#fragment-uri
: http://www.w3.org/TR/html401/struct/links.html#h-12.1.1

Thanks Iván. "Anchor" was the word. Will keep "fragment-uri"
in mind too and really need to process it through javascript. Just
wondered if there was a way to process server-side as well as I
noticed it didn't show up in the $_SERVER variables.

--
Jim Carlock
Jun 30 '07 #4

P: n/a
On Sat, 30 Jun 2007 19:08:25 +0200, Iván Sánchez Ortega wrote:
Jim Carlock wrote:
>(1) What do you call a sublink with the pound (#) symbol?

A link with a fragment identifier.

http://www.w3.org/TR/html401/intro/i...l#fragment-uri
I suppose - for the Subject: - _that_ would be a self-referential answer!
:-)

Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
*** Killfiling google posts: <http://jonz.net/ng.htm>
Jun 30 '07 #5

P: n/a
Jim Carlock <an*******@127.0.0.1wrote:
(1) test.php?test_key=test+value
$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

(2) test.php?test_key=test+value#test_internal_sublink
$_SERVER['SCRIPT_NAME'] returns /test/test.php
$_SERVER['REQUEST_URI'] returns /test/test.php?test_key=test+value
$_SERVER['QUERY_STRING'] returns test_key=test+value

Questions
(2) How do I get to the #test_internal_sublink?
maybe you can see around 'parse_url()' function :

<http://www.php.net/manual/en/function.parse-url.php>

--
@@@@@
E -00 comme on est very beaux dis !
' `) /
|\_ =="
Jun 30 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.