try {
$stmt->execute($sq);
} catch (PDOException $e) {
print_r($e->getMessage());
$stmt->debugDumpParams();
}
func(a, b, c)["Something"]
$a = func(a, b, c); $a["Something"]
/* 50: */
$fetchparts = $this->mail_fetchparts($this->Mail, $num);
$obj["Body"] = trim(imap_base64($fetchparts[abs($this->html)]));
/* 78: */
$exploded = explode(";", $headers["Received"][0]);
$hdr["Date"] = date("H:i:s d-m-Y", strtotime(trim($exploded[1])));
composer require philo/laravel-blade --save-dev
$blade = new \Philo\Blade\Blade("/path/to/blade/views", "/path/to/blade/cache");
echo $blade->view()->make('templateName', $params)->render(); //здесь как в laravel
function view($view, $params = []){
$blade = new \Philo\Blade\Blade("/path/to/blade/views", "/path/to/blade/cache");
$blade = $this->loadCompiler();
return $blade->view()->make($view, $params)->render();
}
<a href="#" data-id="1">Название картины</a>
def cart(request,id):
if 'cart' not in request.session:
request.session['cart'] = list()
request.session['cart'].append(int(id))
....
return ...
def checkout(request):
cart = Images.objects.filter(pk__in=request.session['cart'])
....