farkewie Posted December 14, 2007 Share Posted December 14, 2007 Hi i have a page on my localnetwork where i can browse through the folders on the HDD, all is working good but i want links up the top to go back through all the directorys you have just gone through, here is my code $links = explode( "/", $_GET['dir'], 2 ); echo $_GET['dir'] . "<br/><br/><br/>"; echo $links . "<br/><br/><br/>"; if ( ($_GET['dir']) != "" and is_array($links) ) { for ( $i = 1; $i <= sizeof($links); $i++ ) { if ( $links[$i] != "" ) { foreach ( $links as $link ) { echo " -> <a href=\"{$_SERVER[php_SELF]}?inc=z&dir={$link}\">$link</a> ->"; } } } } now i know i have a start here because it is creating links but, it creates 2 of everything, and i need it if say dir looks like this" /di1/dir2/dir3/dir4" when i click on dir1 the link wil be dir=dir1 when i click on dir3 the link will be dir=/di1/dir2/dir3/ i have been googleing i made it this far but im stuck now... Link to comment https://forums.phpfreaks.com/topic/81622-create-directory-links-like-php-freaks-forums-php-and-mysql-php-help/ Share on other sites More sharing options...
farkewie Posted December 14, 2007 Author Share Posted December 14, 2007 does anyone know what i should be googleing for? i cant seem to find anything for what i want? Link to comment https://forums.phpfreaks.com/topic/81622-create-directory-links-like-php-freaks-forums-php-and-mysql-php-help/#findComment-414867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.