Hack for listing your projects on the xampp's index page

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Hack for listing your projects on the xampp's index page

Postby vivasharma07 » 04. October 2013 18:15

//replace code in xampp/htdocs/xampp/start.php with the below code

<?php
include "langsettings.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann">
<link href="xampp.css" rel="stylesheet" type="text/css">
<title></title>
<script>
function changeProject(ele){
if(ele.value!=''){
window.open('http://localhost:8080/'+ele.value,'_blank');
}
}
</script>
</head>

<body>
&nbsp;<br>
<h1><?=$TEXT['start-head']?>!</h1>
<b><?=$TEXT['start-subhead']?></b><p>


<?=$TEXT['start-text1']?><p>
<?=$TEXT['start-text2']?><p>
<?=$TEXT['start-text3']?><p>
<?=$TEXT['start-text4']?><p>
<?=$TEXT['start-text6']?>
<br><span class="nh" style="color:#000;">Projects</span><br>
<select name="" id="" onchange="changeProject(this);">
<option value="">Select</option>
<?php
$dir = "../";
$d = dir($dir);
$projectContents = "";
while (false !== ($entry = $d->read())) {
$projectContents .= '<option value="'.$entry.'">'.$entry.'</option>';
}
$d->close();
echo $projectContents;
?>
</select>
</body>
</html>
vivasharma07
 
Posts: 1
Joined: 04. October 2013 17:27
XAMPP Version: 1.8.3
Operating System: Windows 8 64-bit

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests