shortysbest Posted May 6, 2010 Share Posted May 6, 2010 I had this script to change the class of the current page, but now i have used mod_rewrite to change the url and it doesnt work and im not exactly sure what modifications to make to it. my url before would be www.mysite.com/sw.php?node=home but now it is www.mysite.com/node/home <?php $current_file = basename(__FILE__); $key = NULL; $value = NULL; $get_string = ''; $start = TRUE; foreach ($_GET as $key => $value) { if ($start) { $get_string .= '?'; $start = FALSE; } else $get_string .= '&'; $get_string .= $key.'='.$value; } $current_page = $current_file.$get_string; ?> Any help on this would be greatly appreciated Link to comment https://forums.phpfreaks.com/topic/200857-current-page-class-change/ Share on other sites More sharing options...
shortysbest Posted May 6, 2010 Author Share Posted May 6, 2010 Solution $current_page = $_GET['node']; Link to comment https://forums.phpfreaks.com/topic/200857-current-page-class-change/#findComment-1053939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.