Results 1 to 9 of 9
-
05-23-2004, 01:32 PM #1Web Hosting Master
- Join Date
- Mar 2004
- Location
- USA
- Posts
- 4,345
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 HelpTesting 1.. Testing 1..2.. Testing 1..2..3...
-
05-23-2004, 01:40 PM #2Web Hosting Master
- 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.
-
05-23-2004, 02:04 PM #3Web Hosting Master
- 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...
-
05-23-2004, 02:22 PM #4Web Hosting Master
- 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...
-
05-23-2004, 02:24 PM #5Web Hosting Master
- 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...
-
05-23-2004, 02:45 PM #6Web Hosting Master
- 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 aroundTesting 1.. Testing 1..2.. Testing 1..2..3...
-
05-26-2004, 03:37 PM #7Web Hosting Master
- 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...
-
05-26-2004, 07:33 PM #8WHT Addict
- 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
}
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
-
05-27-2004, 02:35 AM #9Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
No, $_SERVER and other variables ($_POST, $_REQUEST, $_GET, $_COOKIE, $_FILES, etc.) are globally available.