chmod guo+x
) иможно обойтись без установк пакета. add_filter( 'test_term_url', static function ( string $nameTaxonomy, string $termSlug ) {
$terms = get_terms( [
'taxonomy' => $nameTaxonomy,
'hide_empty' => true,
'slug' => $termSlug,
] );
$terms = array_shift( $terms );
return get_term_link( $terms );
}, 10, 2 );
<?= apply_filters('test_term_url', 'type-work', 'clients' ) ?>
# worker_processes по количеству ядер процессора
worker_processes 6;
error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
client_body_temp_path /tmp/client_body_temp;
proxy_temp_path /tmp/proxy_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
version: '3'
services:
#Php-fpm Service
app:
build:
context: ./docker/php/
dockerfile: Dockerfile
container_name: app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./www:/var/www
- ./logssss:/var/log/
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
links:
- db
networks:
- laravel-network
#Nginx Service
webserver:
build:
context: ./docker/nginx/
dockerfile: Dockerfile
container_name: webserver
restart: unless-stopped
tty: true
ports:
- '80:8080'
- '443:4430'
volumes:
- ./www:/var/www
- ./hosts/:/etc/nginx/conf.d
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./logs:/var/log/nginx
links:
- app
- db
networks:
- laravel-network
#MariaDB Service
db:
build:
context: ./docker/mysql/
dockerfile: Dockerfile
container_name: db
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./mysql:/var/lib/mysql/
- ./docker/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- laravel-network
#PHPMyadmin Service
pma:
image: phpmyadmin:latest
container_name: pma
restart: unless-stopped
tty: true
ports:
- 81:80
environment:
PMA_HOST: db
MYSQL_USERNAME: root
MYSQL_ROOT_PASSWORD: secret
links:
- db
networks:
- laravel-network
#Docker Networks
networks:
laravel-network:
driver: bridge
FROM nginx
# Add user for laravel application
RUN groupadd -g 1000 www
RUN useradd -u 1000 -ms /bin/bash -g www www
USER www
function scrollTracking() {
var lastScrollTop = 0;
$(document).on('scroll', function () {
var currentScrollTop = $(this).scrollTop();
if (currentScrollTop > lastScrollTop) {
console.log('Прокрутка вниз');
} else {
console.log('Прокрутка вверх');
}
lastScrollTop = currentScrollTop;
});
}
function scrollTracking() {
var lastScrollTop = 0;
$(document).on('scroll.scrollTracking', function () {
var currentScrollTop = $(this).scrollTop();
if (currentScrollTop > lastScrollTop) {
console.log('Прокрутка вниз');
} else {
console.log('Прокрутка вверх');
}
lastScrollTop = currentScrollTop;
});
}
return $(document).on('scroll.isShow', function () {
if (is_shown()) {
if (blockShow === null || blockShow === false) {
console.log('Блок ' + self.attr('class') + ' ПОЯВИЛСЯ');
scrollTracking();
}
blockShow = true;
} else {
$(document).off('scroll.scrollTracking',scrollTracking());
if (blockShow === null || blockShow === true) {
console.log('Блок ' + self.attr('class') + ' СКРЫТ');
}
blockShow = false;
}
})
$(document).off('scroll.scrollTracking',scrollTracking());
Оставив, общий, отвечающий за определение - находиться ли элемент в области видимости или нет (.*min:(?<MIN>\d*))(.*max:(?<MAX>\d*))
Failed loading /usr/lib/php/20190902/xdebug.so: /usr/lib/php/20190902/xdebug.so: undefined symbol: zend_post_startup_cb
php-config --version
. Если собираете, например, xdebuger.so для версии php7.2, а версия php-config --version
будет другой, в конечном итоге получете ошибку../configure
, указать полный путь до php-config
. В моем случае получилось так: ./configure --with-php-config=/usr/bin/php-config7.2
RewriteEngine on
# Само правило
RewriteRule ^-(.*) /redirect.php?key=$1 [L]
#div1 {
background: url("Adventure-Consultants/Ice-axe.png") repeat;
}