Jump to content

if ("$url" == "/index.php"){echo "current";}


ted_chou12

Recommended Posts

For starters I'd remove the quotes around $url

[code]<?php
// get just the filename, no additional slashes or anything
$url = basename($_SERVER['PHP_SELF']);

// now look for just the file (I've removed the additional slash)
if ($url == "index.php"){
  echo "current";
}
?>[/code]

Regards
Huggie

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.