This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in $1/*.mp3; | |
do | |
file=$(basename $i) | |
echo "<li><audio preload='none' controls='controls'><source src='$file' type='audio/mp3'/></audio> <a href='$file'>download $file</a></li>" >> "$1/index.html"; | |
done; | |
echo "<li><a href='$1'>$1</a></li>" >> index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class db { | |
// Eigenschaft um die Datenbankverbindung zu speichern. | |
protected static $con = null; | |
// Zugangsdaten als Parameter weil global böse ist | |
public static function createConnection($host, $name, $user, $pass) { | |
// neue Verbindung erzeugen und in Klasse speichern. | |
self::$con = new mysqli($host, $user, $pass, $name); |