1. First of all listing your local projects stored in htdocs folder or www(for wampp) is a great idea to get a look at your projects.
$dir = "../webroot"; //give ur directory where project is located2. The index.php file is created that loads automatically when http://localhost is hit in the address bar. The localhost folder is created to store the javascript, css and images files.
if($handle = opendir($dir)){
while($file = readdir($handle)){
clearstatcache();
if(!is_file($dir.'/'.$file) && $file[0] != '.' && $file != '..' && $file!='localhost') //which directory not to show
print "<font face=\"Verdana, Arial, Helvetica, sans-serif\"> <li><a href=$file target='_blank'>$file</li></font></a>";
}
closedir($handle);
}
3. Finally the localhost is customized according to your need.
Here is screenshot of how I came up with my localhost….
Download the localhost source codes.
0 comments:
Post a Comment