SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist hessodreamy's Avatar
    Join Date
    Apr 2005
    Location
    uk
    Posts
    525
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Why are HTTP_ACCEPT and REQUEST_URI contained in $_SERVER rather than $_REQUEST?

    Just interested. Seems like it would make more sense if they (and some others in $_SERVER) were in $_REQUEST...
    Can you tell I'm having a productive day at the office?

  2. #2
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At first, I consider $_REQUEST not very useful. I have not use it for years.
    Secondly, when the $_REQUEST contains data that application-specific, HTTP_ACCEPT is browser specific and should not really affect on how application works. The same for other HTTP request variables that are in $_SERVER.
    I'm creating trouble-free Apache, PHP, MySQL installer, WITSuite,
    and use it to setup my development environment.
    Demo, support, contact. Questions?

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    $_REQUEST contains GET + POST + COOKIE which are the request.
    $_SERVER contains environment settings HTTP headers are part of the environment, request URI is processed by the web server therefor its in $_SERVER.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •