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
?>
<?php
echo "My first PHP script!";
echo "<audio controls src='project/podcasts/$newest_file'></audio>";
?>
<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