
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] HTTP_ACCEPT ...?
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/
Home |
Main Index |
Thread Index