This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
<?php | |
# Simple loop copy | |
function loop_copy($array) { | |
$object = new stdClass(); | |
foreach ($array as $key => $value) { | |
$object->$key = $value; | |
} | |
} |
<?php | |
/** | |
* Class Container | |
*/ | |
class Container | |
{ | |
/** | |
* @var array | |
*/ |
<?php | |
$host = 'localhost'; | |
$user = 'root'; | |
$password = '123456'; | |
$dbname = 'pdoposts'; | |
// Set DSN | |
$dsn = 'mysql:host='. $host .';dbname='. $dbname; | |
// Create a PDO instance |
$ ssh [email protected]
$ mkdir test
$ cd test