Re: Re: What makes _SERVER stop working (RESOLVED)
| From: | Miller, Terion | Date: | Tue, 04 Aug 2009 19:22:20 +0000 |
| Subject: | Re: Re: What makes _SERVER stop working (RESOLVED) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296300@lists.php.net to get a copy of this message | ||
On 8/3/09 7:44 PM, "Shawn McKenzie" <nospam@mckenzies.net> wrote:
Miller, Terion wrote:
> All of a sudden this stopped working and keeps defaulting to A again
>
> if ($_SERVER['SCRIPT_FILENAME'] = "browse.php" ) {
>
> $default = "A";
>
> }
>
>
> else {
>
> $default = "";
>
> }
>
It stopped working or never worked because your if statement is wrong ==
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Right, I need to mark this one resolved I finally got it to work with this:
// Main controller which page to show. if (isset($_GET['letter'])) {
browse($_GET['letter']); } elseif (basename($_SERVER['SCRIPT_FILENAME']) ==
"browse.php" ) { browse('A'); } else { index(); }