Skip to content

Instantly share code, notes, and snippets.

@semasping
semasping / gist:85c9262ce991417680d2f26d833b8fec
Created June 23, 2017 10:56
vestacp nginx php-fpm laravel template
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%/public;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
location / {
try_files $uri $uri/ /index.php?$query_string;
@semasping
semasping / entity.php
Created May 4, 2016 12:52
Класс для работы с Entity
<?php
require_once _ROOT . 'vendor/autoload.php'; //предполагаем композер для ADODB
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
$ADODB_QUOTE_FIELDNAMES = true;
/**
* Базовый класс для бизнес-сущностей
* Реализует паттерн Active Directory
function getTime(){
list($msec,$sec)=explode(chr(32),microtime());
$HeadTime=$sec+$msec;
return $HeadTime;
}