replaced index.html with index.php

master
Angeliki 6 years ago
parent 29234433a1
commit f0c3087993

@ -105,46 +105,21 @@
});
</script>
<button onclick="window.open('file:///home/angeliki/.local/bin/podcast')">
<button>
make your own podcast
</button>
<div>latest episode</div>
<?php
//insert the folder HERE
$files = scandir("project/podcasts", SCANDIR_SORT_DESCENDING);
$newest_file = $files[0];
echo $newest_file
echo "<audio controls src='project/podcasts/$newest_file'></audio>";
?>
<?php
echo "My first PHP script!";
?>
<script >
var fs = require('fs'),
path = require('project/podcasts/'),
_ = require('underscore');
// Return only base file name without dir
function getMostRecentFileName(dir) {
var files = fs.readdirSync(dir);
// use underscore for max()
return _.max(files, function (f) {
var fullpath = path.join(dir, f);
// ctime = creation time is used
// replace with mtime for modification time
return fs.statSync(fullpath).ctime;
});
}
</script>
</body>
Loading…
Cancel
Save