|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
goto next folder on same level
Example:
ROOT/Folder1/index.php ROOT/Folder2/index.php ROOT/Folder3/index.php (Current Folder) I would like to insert code in each index.php file that would allow the user to goto previous / next folders on the same level. So far I have this much code that displays all files in the current folder but how do you ../ to the parent folder and display only the folders? <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$filen"; ?><br><? } } closedir($handle); } ?> |
|
#2
|
|||
|
|||
|
RE: goto next folder on same level
to display only folders, do an if(is_dir($file))
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > goto next folder on same level |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|