Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] HTTP_ACCEPT ...?
- Date: Sun, 13 Apr 2008 17:54:31 +0900
- From: Brian Chandler <brian@example.com>
- Subject: Re: [tlug] HTTP_ACCEPT ...?
- References: <47FEC2A5.4060709@articlass.org>
- User-agent: Thunderbird 1.5.0.5 (X11/20060728)
Dave M G wrote:TLUG,
On one web hosting server where I'm running some PHP scripts, I keep getting an error that says:
Undefined index: HTTP_ACCEPT
I don't actually know what this means: (a) That HTTP_ACCEPT (which is the index in the array $_SERVER[] is undefined, or (b) That the value in the array is not set... but
I look for $_SERVER[HTTP_ACCEPT]
Note that this should really be $_SERVER["HTTP_ACCEPT"]
The index to the array is a string. In at least some versions of PHP you can omit the quotes, and it will still be interpreted as a string, but there is a warning about not doing this with the introduction of defined constants (e.g. you'd write define('HTTP_ACCEPT', "HTTP_ACCEPT"); which makes HTTP_ACCEPT a _constant_ having the right value. Well if you wanted to get confused you would...)
It is _just_ possible that without quotes the interpreter says, ara! HTTP_ACCEPT should be a constant, but it isn't defined, so I'll give the above error message.
"---**
I'm finding PHP an immensely productive way of getting things done, but good grief, it's a mess... but here's a mystery:
http://imaginatorium.org/fun/anti.php
Can't get this program to run. Whatever I do to try and enable the php interpreter, all I get out is the source.
Brian Chandler http://imaginatorium.org/
- References:
- [tlug] HTTP_ACCEPT ...?
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Re: Why Vista Sucks
- Next by Date: [tlug] Linux podcast episode 1
- Previous by thread: [OT] Re: [tlug] HTTP_ACCEPT ...?
- Next by thread: [tlug] HTTP_ACCEPT ...?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links