$php_self = explode("/", $_SERVER[PHP_SELF]); $url_cnt = count($php_self)-1; $this_path =$php_self[$url_cnt-1]; $this_page =$php_self[$url_cnt]; $page_ = $this_path."/".$this_page; if ($this_path=="") include('admin/common.php'); else include('../admin/common.php'); ?>