Click to See Complete Forum and Search --> : nubee question


frank1002
03-23-2006, 12:47 PM
i want to do something like this
if the url in the address bar is only mysite.com then set $only_site=1
if the url contain anything else like mysite.com/index.php
or whatever after / then i want to set $only_site=0

sitehatchery
04-08-2006, 08:07 PM
put this at the beginning of every file:

$only_site=strpos($_SERVER['PHP_SELF'],'index.php')?1:0;

balloonbuffoon
04-08-2006, 08:29 PM
$only_site = ($_SERVER["REQUEST_URI"]=="/") ? 1 : 0;

--Steve

sitehatchery
04-08-2006, 09:40 PM
that works too.