ali_2kool2002 Posted March 6, 2007 Share Posted March 6, 2007 Hi can anyone tel me how i can go back a directory from the current code: say for example in the code below im in localhost but current location in that directory is in a sub directory but i want to refer to a file back in the localhost? how do i do that? hope that makes sense thnx echo"<ul><li class='style9'><a href='$cat_name'.php'>'$cat_name'</a></li> </ul>"; Link to comment https://forums.phpfreaks.com/topic/41494-going-back-1-directory-in-php-hyperlink/ Share on other sites More sharing options...
boo_lolly Posted March 6, 2007 Share Posted March 6, 2007 try this: echo "<ul>\n". "<li class=\"style9\"><a href=\"../". $cat_name .".php\">". $cat_name ."</a></li>\n". "</ul>\n"; Link to comment https://forums.phpfreaks.com/topic/41494-going-back-1-directory-in-php-hyperlink/#findComment-201018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.