To PHP-general group,
I have configured PHP to report all errors & warnings ("error_reporting
= E_ALL" on php.ini file), but since then I get tons of warning
messages for "Undefined variables". For example, referring $HTTP_HOST
directly leads a message like "Undefined variable: HTTP_HOST in ... on
line ...". I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] instead, but
then I get the message "Undefined index: HTTP_HOST in ... on line ...".
How do I get rid of these messages? I also get these messages for
internal variables, cookie variables (globals) etc.
I am also interested in testing whether the user typed the URL properly,
including upper/lower case. I'm using this code to check it in the
beginning of the page:
<?php
if (strcmp($HTTP_SERVER_VARS['HTTP_HOST'], 'dating.speedy.co.il') != 0)
{
header('Location: http://dating.speedy.co.il/');
exit;
}
?>
But, if the user enters <http://DATING.SPEEDY.CO.IL/>, this has no
effect. Is there any way to get a case sensitive version of HTTP_HOST?
(I noticed HTTP_HOST has changed since the previous version of PHP &
apache).
Thanks,
Uri Even-Chen
Speedy Software
Raanana, Israel.
--------------------------------------------------------
Welcome to Speedy Net (In Hebrew):
http://www.speedy.co.il/
Speedy Dating (In Hebrew):
http://dating.speedy.co.il/
Speedy Composer (In English):
http://www.speedy.co.il/composer/
--------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]