I wrote this code to make my life more simple. I modify start.php file that is placed in "your instalation dir"\htdocs\xampp\start.php. This code put in the xampp homepage a list of your projects that are located in htdocs folder.
Download the images that i am using at my host: http://www.ecanti.com.br/files/
Enjoy!
bofore "</body></html>":
- Code: Select all
<?php
echo "<br>";
echo "<h1>My Projects:</h1>";
$folder = "E:/xampp/htdocs";// path of htdocs
//Directory list
if(!$open = @opendir($folder))
die('O diretório não é valido!');
while(($namearq = readdir($open)) !== false) {
if($namearq == "." or $namearq == "..") continue;
$dir = "E:/xampp/htdocs/".$namearq;
if(is_dir($dir)){
$list_dir .= "<img src=\"http://www.ecanti.com.br/files/folder.png\" width=\"18\" height=\"15\" alt=\"\"><a href=\"/$namearq\" target=\"top\">$namearq<br></a>\n";
} else {
$list_file .= "<img src=\"http://www.ecanti.com.br/files/file.png\" width=\"18\" height=\"16\" alt=\"\"><a href=\"$namearq\" target=\"top\">$namearq<br></a>\n";
}
}
echo $list_dir;
echo $list_file;
?>