Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Dynamic Project Listing in XAMPP
- * @link http://weblogs.asp.net/bsimser/dynamic-project-listing-for-xampp
- */
- $handle = opendir(".");
- $projectContents = '';
- // readdir = Read entry from directory handle
- while ($file = readdir($handle)) {
- if ( is_dir($file) && ($file != "..") && ($file != ".") ) {
- $projectContents .= '<li><a href="'.$file.'">'.$file.'</a></li>';
- }
- }
- closedir($handle);
- if (!isset($projectContents))
- $projectContents = "No Projects";
- ?>
- <ul id="projectList">
- <?php echo $projectContents ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement