The pound # in $_SERVER variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Carlock

    #1

    The pound # in $_SERVER variables

    (1) test.php?test_k ey=test_value

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

    (2) test.php?test_k ey=test_value#t est_internal_su blink

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

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

    --
    Jim Carlock


  • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

    #2
    Re: The pound # in $_SERVER variables

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



    (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?

    Comment

    • Jim Carlock

      #3
      The pound # in $_SERVER variables

      (1) test.php?test_k ey=test+value

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

      (2) test.php?test_k ey=test+value#t est_internal_su blink

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

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

      --
      Jim Carlock


      Comment

      • Jim Carlock

        #4
        Re: The pound # in $_SERVER variables

        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


        Comment

        • Allodoxaphobia

          #5
          Re: The pound # in $_SERVER variables

          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>

          Comment

          • denisb

            #6
            Re: The pound # in $_SERVER variables

            Jim Carlock <anonymous@127. 0.0.1wrote:
            (1) test.php?test_k ey=test+value
            $_SERVER['SCRIPT_NAME'] returns /test/test.php
            $_SERVER['REQUEST_URI'] returns /test/test.php?test_k ey=test+value
            $_SERVER['QUERY_STRING'] returns test_key=test+v alue
            >
            (2) test.php?test_k ey=test+value#t est_internal_su blink
            $_SERVER['SCRIPT_NAME'] returns /test/test.php
            $_SERVER['REQUEST_URI'] returns /test/test.php?test_k ey=test+value
            $_SERVER['QUERY_STRING'] returns test_key=test+v alue
            >
            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 !
            ' `) /
            |\_ =="

            Comment

            Working...