return [
'host' => 'localhost';
'port' => 3306;
'user' => 'root';
'password' => 'ПАРОЛЬ';
'db' => 'БАЗА';
'authme_table' => 'users';
];
class Config {
public $host;
public $user;
// ...
public function __construct(array $conf){
$this->host = $conf['host'];
$this->user = $conf['user'];
// ...
}
}
class AuthController {
protected $config;
public function __construct(Config $config){
$this->config = $config
}
}
$conf = include "/engine/data/dbconfig.php";
$config = new Config($conf);
$constroller = new AuthController($config);
name="files[]"
tg://
, скайп – skype://
.execprogam://
, ассоциируете его со своей самописной программой или скриптом и делаете на web-странице ссылки вида execprogram://calc.exe
//Перенос файлов PHP
function php() {
return src(path.src.php)
// .pipe(webphtml()) Вот эту хрень выбросите
.pipe(dest(path.build.php))
.pipe(browsersync.stream())
}
SELECT * FROM users WHERE username=:username
$user = [
'id' => 1,
'username' => 'vasya',
'password' => 'длинный хеш'
]
password_verify($old_password, $user['hash'])
$hash = password_hash($new_password, PASSWORD_DEFAULT);
UPDATE users SET password=:hash WHERE id=$user['id']
while($row = $result->fetch_array())
{
echo 'Author: ' . $row['author'] . "<br>";
echo 'Title: ' . $row['title'] . "<br>";
echo 'Category: ' . $row['category'] . "<br>";
echo 'Year: ' . $row['year'] . "<br>";
echo 'ISBN: ' . $row['isbn'] . "<br><br>";
}
foreach ($not_calculate_dpd as $not_calculate) {
if ($not_calculate['value'] == attribute($_context, 'shipping_dpd_not_calculate' ~ $not_calculate['value'])) {
echo $not_calculate['name'];
} else {
echo $not_calculate['name'];
}
}
foreach ($not_calculate_dpd as $not_calculate) {
echo $not_calculate['name'];
}
"psr-4": {
"core\\": "app/core"
}