Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345

    Angry I Can Not Reterieve The $_server['http_user_agent']

    ???

    It was working ok with my IIS but when i used it on my server it is empty..

    I tried to see if it even exists by using print_r($_SERVER) and the strange thing is THAT IT IS NOT EVEN THERE????

    Please Help
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  2. #2
    Join Date
    Jun 2003
    Location
    United States of America
    Posts
    1,847
    maybe tryin a php info file may be a good place to start
    Computer Steroids - Full service website development solutions since 2001.
    (612)234-2768 - Locally owned and operated in the Minneapolis, Minnesota area.

  3. #3
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345
    the problem is the file im trying to do it in is an include and thats why i think its not working..

    i am trying to somehow save the variable before calling the include so it would have it ready..

    any help is appreciated

    thnx,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  4. #4
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345
    Damn it...
    I tried to include it as a variable ?s='sdfs' @@@ its not working??

    i also tried the sessions and cookies it doenst???
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  5. #5
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345
    Warning: main(http://www.free-php-scripts.net/bann...hp?id=ffa30&b= MSIE 6.0&s= Windows NT 5.1)): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/freephp/public_html/header.php on line 309

    Warning: main(): Failed opening 'http://www.free-php-scripts.net/bannerman/counter.php?id=ffa30&b= MSIE 6.0&s= Windows NT 5.1)' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/freephp/public_html/header.php on line 309

    Testing 1.. Testing 1..2.. Testing 1..2..3...

  6. #6
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345
    Spaces.... Dam them..

    I got over it by replacing them with %20 :p

    no wonder i seen them alot around
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  7. #7
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,345
    Can I ask one more question:

    Why was it when I included the file, the included file didnt have access to the $_SERVER variables?

    Is it suppose to be like that?
    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  8. #8
    Join Date
    Apr 2004
    Location
    Port St Lucie, FL
    Posts
    117
    I usually have my include files declare a function, which I then use in my main script. That way, you can fairly simply control the data going to them by using the function arguments. You can also reuse the calls easier that way.

    Good, bad or indifferent - it seems to work for me.

    Ex: banner.php
    PHP Code:
    function printBanner ($bannerName)
    {
        
    // blah, blah, blah.. some stuff here

    main.php:
    PHP Code:

    require_once ("banner.php");
    // blah, blah, blah

    printBanner("My Banner"); 
    Paul Embry
    Knight Software and Web Design
    Paul.Embry@gmail.com
    Quality PHP Web Programming for Reasonable Prices

  9. #9
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    No, $_SERVER and other variables ($_POST, $_REQUEST, $_GET, $_COOKIE, $_FILES, etc.) are globally available.

Posting Permissions

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