473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

The pound # in $_SERVER variables

(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
5 3109
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
(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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob | last post by:
Hello all, I'm attempting to use JpGraph (http://www.aditus.nu/jpgraph/index.php) with PHP (4.3.1) and Apache (1.3.26) runnning on WindowsXP. However, I receive the following notice: Notice:...
5
by: Stephen Poley | last post by:
I'm trying to understand sessions and authentication. I gathered that the only way of preserving data across script invocations was to use a session. However I note that $_SERVER and $_SERVER...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
4
by: Joshua Beall | last post by:
Hi All, I've seen many references to the $_SERVER variable, which is set to the string 'on' when the client is connected via HTTPS rather than regular HTTP. However, I have been unable to find...
3
by: Joshua Beall | last post by:
Hi All, What is the difference between $_SERVER and $_SERVER, and which is better to use? According to the CGI 1.1 spec (http://hoohoo.ncsa.uiuc.edu/cgi/env.html), SCRIPT_NAME is not...
10
by: Jim Carlock | last post by:
Looking for a way to extract the path from the pfqpn (partially full qualified path name). $sThisServer = $_SERVER; // returns either aquaticcreationsnc.com or www.aquaticcreationsnc.com ...
2
by: lawrence k | last post by:
I noticed this odd PHP function in an article about AJAX and Prototype: > http://www.sitepoint.com/article/painless-javascript-prototype/2 > > Prototype adds a custom HTTP header to all its...
1
by: sharadg | last post by:
Why is it that IIS6 does not provide all the $_SERVER variables, otherwise available underApache ? Examples being, SERVER_ADDR, SERVER_PORT ... Is there any way to declare server variables under...
8
by: e_matthes | last post by:
Hello, I keep reading that $_SERVER can easily be faked. Is that true of all server variables, or just some of them? In particular, I'm wondering if server_port can be faked. I'm interested...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.