function keys(mas=null) {
if (func_num_args() == 0) {
return $this.__keys;
} else {
// по аналогии
}
}
12 server {
13 listen 80;
14 listen [::]:80;
15 server_name my.like.srv;
16 client_max_body_size 32m; # Максимальный размер скачиваемого файла
17 access_log /home/user/my.like.srv/logs/nginx_access.log;
18 error_log /home/user/my.like.srv/logs/nginx_error.log; # debug добавлять только если нужна отладка работы.
19 location ~* .(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3|docx|xlsx)$ {
20 root /home/user/my.like.srv/public_html/;
21 error_page 404 = @fallback;
22 index index.html index.php;
23 access_log off;
24 expires 30d;
25 }
26 location ~ /.ht { deny all; }
27 location / {
28 proxy_pass http://127.0.0.1:81/;
29 proxy_set_header X-Real-IP $remote_addr;
30 proxy_set_header X-Forwarded-for $remote_addr;
31 proxy_set_header Host $host;
32 proxy_connect_timeout 60;
33 proxy_send_timeout 90;
34 proxy_read_timeout 90;
35 proxy_redirect off;
36 proxy_set_header Connection close;
37 proxy_pass_header Content-Type;
38 proxy_pass_header Content-Disposition;
39 proxy_pass_header Content-Length;
40 }
41 location @fallback {
42 proxy_pass http://127.0.0.1:81;
43 proxy_set_header Host $host;
44 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45 proxy_set_header X-Forwarded-Proto $scheme;
46 proxy_set_header X-Real-IP $remote_addr;
47 }
48 }
12 <VirtualHost *:81>
13 ServerName my.like.srv
14 ServerAlias www.my.like.srv
15 ServerAdmin support@my.like.srv
16 DocumentRoot "/home/user/my.like.srv/public_html"
17 <Directory />
18 Options FollowSymLinks
19 AllowOverride None
20 </Directory>
21 <Directory /home/user/my.like.srv/public_html/>
22 Options Indexes FollowSymLinks MultiViews
23 AllowOverride All
24 Order allow,deny
25 Allow from all
26 Require all granted
27 </Directory>
28 ErrorLog /home/user/my.like.srv/logs/errors.log
29 LogLevel warn
30 CustomLog /home/user/my.like.srv/logs/access.log combined
31 AssignUserId www-data user
32 </VirtualHost>
proxy_pass http://127.0.0.1:8080;
./test.php -f ./2
Тест распаковки файла ./2
'
<p></p>
<p></p><p></p>
<p></p>
<p></p><p></p>
<p></p><p></p>'
~/test$
./test.php -f ./1
Тест распаковки файла ./1
'<p></p>
'
~/test$ php --version
PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies
~/test$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.2 (stretch)
Release: 9.2
Codename: stretch
~/test$ gzip -V
gzip 1.6
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Jean-loup Gailly.