Thanks in advance.
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT TYPE="text/javascript">
<!--
function soundplay()
{
if (navigator.appN ame == "Netscape")
{
document.MySoun d.play(false)
return false;
}
else
return true;
}
//-->
</SCRIPT>
</head>
<body>
<?
$music=$_GET['music'];
$dir ="song";
$dh = opendir($dir);
while ( !(($file = readdir($dh)) === false) )
{
if ($file == "." || $file == "..") continue;
if (eregi(".wav",$ file))
{
echo' <a href="?music=tr ue&file='. $dir . '/' . $file . '" onClick="return soundplay()">'. $file.'</A>';
}
}
if($music == 'true')
{
$file = $_GET['file'];
echo '<EMBED src="'. $dir . '/' . $file . '" NAME="MySound" HEIGHT=144 WIDTH=166 MASTERSOUND HIDDEN >';
}
?>
</body>
</html>
[/code]
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT TYPE="text/javascript">
<!--
function soundplay()
{
if (navigator.appN ame == "Netscape")
{
document.MySoun d.play(false)
return false;
}
else
return true;
}
//-->
</SCRIPT>
</head>
<body>
<?
$music=$_GET['music'];
$dir ="song";
$dh = opendir($dir);
while ( !(($file = readdir($dh)) === false) )
{
if ($file == "." || $file == "..") continue;
if (eregi(".wav",$ file))
{
echo' <a href="?music=tr ue&file='. $dir . '/' . $file . '" onClick="return soundplay()">'. $file.'</A>';
}
}
if($music == 'true')
{
$file = $_GET['file'];
echo '<EMBED src="'. $dir . '/' . $file . '" NAME="MySound" HEIGHT=144 WIDTH=166 MASTERSOUND HIDDEN >';
}
?>
</body>
</html>
[/code]
Comment