Re: What makes _SERVER stop working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miller, Terion wrote:
>      if ($_SERVER['SCRIPT_FILENAME'] = "browse.php" ) {

You're using the assignment operator above ('=') instead of the comparison
('=='). If that's not simply a typo that entered the code when you composed
your email, then that's the source of your problem.

You might consider putting the literal side of your comparisons on the left of
the operator. Using the example above you could write:

    if ("browse.php" == $_SERVER['SCRIPT_FILENAME']) {

This way if you accidentally use the assignment operator, PHP will give you a
parse error before it even tries to execute the script.

Ben

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux