[EdLUG] Help 5
Andrew Ramage
andrew.ramage.1963 at gmail.com
Wed May 6 17:40:34 UTC 2020
I am still bug hunting, but am also looking at the second part of the
site. Is this right ?
_music.php_
<html>
<body>
<?php
function getmusic()
// Open a directory, and read its contents
{
var musicdir[];
$dir = "Music/";
if (is_dir($dir)){usicdir.push
if ($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
echo $file . "<br>";
musicdir.push($file);
}
closedir($dh);
}
return misicdir;
}
?>
</body>
</html>
_HTML file_
<script>
var array musicdir() = getmusic();
while (($file = readdir($musicdir)) !== false){
echo $file . "<br>";
</script>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.edlug.org.uk/pipermail/edlug/attachments/20200506/e6e1675f/attachment.html>
More information about the EdLUG
mailing list