yilduz: Any PHPers in here right now?
coreyg: yilduz: Eric is
Eric: yes
yilduz: Is there a more efficient way to do this? -
yilduz: $current_page=explode(“?”,$_SERVER["REQUEST_URI"]); $current_page=$current_page[0];
Eric: $page = basename($_SERVER['SCRIPT_FILENAME'], ‘.php’);
Eric: $page = (empty($page)) ? ‘index’ : $page;
yilduz: I’ve never used basename before.
Eric: the first gets the page name, the second sets the page to index if it didn’t return a page
Eric: or eg – if you’re viewing domain.com/folder/ – it’ll be blank
Eric: for*
Eric: for just domain.com
yilduz: Ah, I had a way of doing that second part, but it’s longer than your method.
coreyg: Eric: what’s your main url?
Eric: www.secondversion.com