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
useradd $1 | |
mkdir /home/$1/www | |
chown root /home/$1 | |
echo "/some/external/dir /home/$1/www none rw,bind" >> /etc/fstab | |
mount -a | |
echo " | |
Match User $1 | |
ChrootDirectory /home/$1 | |
ForceCommand internal-sftp |
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 MyDb { | |
protected $link = null; | |
public function __construct() { | |
$this->link = mysqli_connect('host', 'username', 'password', 'database'); | |
} | |
public function getCategoryByName($name) { |