#180305nginx解析php出现502 Bad的问题

问题一

常见502 Bad的问题

1[root@localhost ~]# vi /usr/local/nginx/conf/vhost/test.com.conf 23 50 fastcgi_pass unix:/tmp/php-fcgi.sock; 4改错为 5 50 fastcgi_pass unix:/tmp/php-cgi.sock; 6 7 8[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 9<html> 10<head><title>502 Bad Gateway</title></head> 11<body bgcolor="white"> 12<center><h1>502 Bad Gateway</h1></center> 13<hr><center>nginx/1.8.0</center> 14</body> 15</html> 16[root@localhost ~]# tail /usr/local/nginx/logs/nginx_error.log 172018/03/02 16:07:03 [notice] 7416#0: nginx/1.8.0 182018/03/02 16:07:03 [notice] 7416#0: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 192018/03/02 16:07:03 [notice] 7416#0: OS: Linux 3.10.0-123.el7.x86_64 202018/03/02 16:07:03 [notice] 7416#0: getrlimit(RLIMIT_NOFILE): 1024:4096 212018/03/02 16:07:03 [notice] 7417#0: start worker processes 222018/03/02 16:07:03 [notice] 7417#0: start worker process 7418 232018/03/02 16:07:03 [notice] 7417#0: start worker process 7419

更改级别

1[root@localhost ~]# vi /usr/local/nginx/conf/nginx.conf 23 3 error_log /usr/local/nginx/logs/nginx_error.log crit; 4更改为 5 3 error_log /usr/local/nginx/logs/nginx_error.log debug; 67 1 user nobody nobody; 8 2 worker_processes 2; 9 3 error_log /usr/local/nginx/logs/nginx_error.log debug; 10 4 pid /usr/local/nginx/logs/nginx.pid; 11 5 worker_rlimit_nofile 51200; 12 6 events 13 7 { 14 8 use epoll; 15 9 worker_connections 6000; 16 10 } 17 11 http 18 12 { 19 13 include mime.types; 20 14 default_type application/octet-stream; 21 15 server_names_hash_bucket_size 3526; 22 16 server_names_hash_max_size 4096; 23 17 log_format user '$remote_addr $http_x_forwarded_for [$time_local]' 24 18 ' $host "$request_uri" $status' 25 19 ' "$http_referer" "$http_user_agent"'; 26 20 sendfile on; 27 21 tcp_nopush on; 28 22 keepalive_timeout 30; 29 23 client_header_timeout 3m; 30 24 client_body_timeout 3m; 31 25 send_timeout 3m; 32 26 connection_pool_size 256; 33 27 client_header_buffer_size 1k; 34 28 large_client_header_buffers 8 4k; 35 29 request_pool_size 4k; 36 30 output_buffers 4 32k; 37 31 postpone_output 1460; 38 32 client_max_body_size 10m; 39 33 client_body_buffer_size 256k; 40 34 client_body_temp_path /usr/local/nginx/client_body_temp; 41 35 proxy_temp_path /usr/local/nginx/proxy_temp; 42 36 fastcgi_temp_path /usr/local/nginx/fastcgi_temp; 43 37 fastcgi_intercept_errors on; 44 38 tcp_nodelay on; 45 39 gzip on; 46 40 gzip_min_length 1k; 47 41 gzip_buffers 4 8k; 48 42 gzip_comp_level 5; 49 43 gzip_http_version 1.1; 50 44 gzip_types text/plain application/x-javascript text/css text/htm 51 45 application/xml; 52 46 include vhost/*.conf; 53 47 } 54[root@localhost ~]# /etc/init.d/nginx restart 55Restarting nginx (via systemctl): [ OK ] 56 57 58[root@localhost ~]# vi /usr/local/nginx/conf/nginx.conf 59user nobody nobody; 60worker_processes 2; 61error_log /usr/local/nginx/logs/nginx_error.log debug; 62pid /usr/local/nginx/logs/nginx.pid; 63worker_rlimit_nofile 51200; 64events 65{ 66 use epoll; 67 worker_connections 6000; 68} 69http 70{ 71 include mime.types; 72 default_type application/octet-stream; 73 server_names_hash_bucket_size 3526; 74 server_names_hash_max_size 4096; 75 log_format user '$remote_addr $http_x_forwarded_for [$time_local]' 76 ' $host "$request_uri" $status' 77 ' "$http_referer" "$http_user_agent"'; 78 sendfile on; 79 tcp_nopush on; 80 keepalive_timeout 30; 81 client_header_timeout 3m; 82 client_body_timeout 3m; 83 send_timeout 3m; 84 connection_pool_size 256; 85 client_header_buffer_size 1k; 86 large_client_header_buffers 8 4k; 87 request_pool_size 4k; 88 output_buffers 4 32k; 89 postpone_output 1460; 90 client_max_body_size 10m; 91 client_body_buffer_size 256k; 92 client_body_temp_path /usr/local/nginx/client_body_temp; 93 proxy_temp_path /usr/local/nginx/proxy_temp; 94 fastcgi_temp_path /usr/local/nginx/fastcgi_temp; 95 fastcgi_intercept_errors on; 96 tcp_nodelay on; 97 gzip on; 98 gzip_min_length 1k; 99 gzip_buffers 4 8k; 100 gzip_comp_level 5; 101 gzip_http_version 1.1; 102 gzip_types text/plain application/x-javascript text/css text/htm 103 application/xml; 104 include vhost/*.conf; 105}

检查

1[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 2<html> 3<head><title>502 Bad Gateway</title></head> 4<body bgcolor="white"> 5<center><h1>502 Bad Gateway</h1></center> 6<hr><center>nginx/1.8.0</center> 7</body> 8</html> 9[root@localhost ~]# tail /usr/local/nginx/logs/nginx_error.log 102018/03/02 16:07:03 [notice] 7416#0: nginx/1.8.0 112018/03/02 16:07:03 [notice] 7416#0: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 122018/03/02 16:07:03 [notice] 7416#0: OS: Linux 3.10.0-123.el7.x86_64 132018/03/02 16:07:03 [notice] 7416#0: getrlimit(RLIMIT_NOFILE): 1024:4096 142018/03/02 16:07:03 [notice] 7417#0: start worker processes 152018/03/02 16:07:03 [notice] 7417#0: start worker process 7418 162018/03/02 16:07:03 [notice] 7417#0: start worker process 7419 172018/03/02 16:10:08 [notice] 7418#0: *1 "Spider/3.0|YoudaoBot|Tomato" does not match "curl/7.29.0", client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", host: "test.com" 182018/03/02 16:10:08 [crit] 7418#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "test.com" 192018/03/02 16:10:08 [info] 7418#0: *1 client 127.0.0.1 closed keepalive connection

通过错误信息查询

1[root@localhost ~]# ls /tmp/php-cgi.sock 2ls: cannot access /tmp/php-cgi.sock: No such file or directory

查询php定义的sock

1[root@localhost ~]# cat /usr/local/php-fpm/etc/php-fpm.conf 2[global] 3pid = /usr/local/php-fpm/var/run/php-fpm.pid 4error_log = /usr/local/php-fpm/var/log/php-fpm.log 5[www] 6listen = /tmp/php-fcgi.sock 7listen.mode = 666 8user = php-fpm 9group = php-fpm 10pm = dynamic 11pm.max_children = 50 12pm.start_servers = 20 13pm.min_spare_servers = 5 14pm.max_spare_servers = 35 15pm.max_requests = 500 16rlimit_files = 1024 17

解决方案

1[root@localhost ~]# vi /usr/local/nginx/conf/vhost/test.com.conf 23 50 fastcgi_pass unix:/tmp/php-cgi.sock; 4改为 5 50 fastcgi_pass unix:/tmp/php-fcgi.sock; 6 7 8[root@localhost ~]# /usr/local/nginx/sbin/nginx -t 9nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok 10nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful 11[root@localhost ~]# /usr/local/nginx/sbin/nginx -s reload 12[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 13 正常解析

问题二

1[root@localhost ~]# vi /usr/local/php-fpm/etc/php-fpm.conf 2注释 3 5 listen = /tmp/php-fcgi.sock 45 5 #listen = /tmp/php-fcgi.sock 6添加 7 6 listen = 127.0.0.1:9000 89 1 [global] 10 2 pid = /usr/local/php-fpm/var/run/php-fpm.pid 11 3 error_log = /usr/local/php-fpm/var/log/php-fpm.log 12 4 [www] 13 5 #listen = /tmp/php-fcgi.sock 14 6 listen = 127.0.0.1:9000 15 7 listen.mode = 666 16 8 user = php-fpm 17 9 group = php-fpm 18 10 pm = dynamic 19 11 pm.max_children = 50 20 12 pm.start_servers = 20 21 13 pm.min_spare_servers = 5 22 14 pm.max_spare_servers = 35 23 15 pm.max_requests = 500 24 16 rlimit_files = 1024 25 26 27[root@localhost ~]# vi /usr/local/php-fpm/etc/php-fpm.conf 28[global] 29pid = /usr/local/php-fpm/var/run/php-fpm.pid 30error_log = /usr/local/php-fpm/var/log/php-fpm.log 31[www] 32#listen = /tmp/php-fcgi.sock 33listen = 127.0.0.1:9000 34listen.mode = 666 35user = php-fpm 36group = php-fpm 37pm = dynamic 38pm.max_children = 50 39pm.start_servers = 20 40pm.min_spare_servers = 5 41pm.max_spare_servers = 35 42pm.max_requests = 500 43rlimit_files = 1024 44 45 46 47[root@localhost ~]# /usr/local/php-fpm/sbin/php-fpm -t 48[02-Mar-2018 16:37:48] NOTICE: configuration file /usr/local/php-fpm/etc/php-fpm.conf test is successful 49[root@localhost ~]# /etc/init.d/php-fpm restart 50Gracefully shutting down php-fpm . done 51Starting php-fpm done 52 53[root@localhost ~]# netstat -lntp 54Active Internet connections (only servers) 55Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 56tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2498/master 57tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 7484/php-fpm: maste 58tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7417/nginx: master 59tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1287/sshd 60tcp6 0 0 ::1:25 :::* LISTEN 2498/master 61tcp6 0 0 :::3306 :::* LISTEN 2487/mysqld 62tcp6 0 0 :::22 :::* LISTEN 1287/sshd 63 64 65[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 66<html> 67<head><title>502 Bad Gateway</title></head> 68<body bgcolor="white"> 69<center><h1>502 Bad Gateway</h1></center> 70<hr><center>nginx/1.8.0</center> 71</body> 72</html> 73[root@localhost ~]# tail /usr/local/nginx/logs/nginx_error.log 742018/03/02 16:36:11 [notice] 7462#0: exit 752018/03/02 16:36:12 [notice] 7417#0: signal 17 (SIGCHLD) received 762018/03/02 16:36:12 [notice] 7417#0: worker process 7463 exited with code 0 772018/03/02 16:36:12 [notice] 7417#0: signal 29 (SIGIO) received 782018/03/02 16:36:12 [notice] 7417#0: signal 17 (SIGCHLD) received 792018/03/02 16:36:12 [notice] 7417#0: worker process 7462 exited with code 0 802018/03/02 16:36:12 [notice] 7417#0: signal 29 (SIGIO) received 812018/03/02 16:38:55 [notice] 7474#0: *5 "Spider/3.0|YoudaoBot|Tomato" does not match "curl/7.29.0", client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", host: "test.com" 822018/03/02 16:38:55 [crit] 7474#0: *5 connect() to unix:/tmp/php-fcgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fcgi.sock:", host: "test.com" 832018/03/02 16:38:55 [info] 7474#0: *5 client 127.0.0.1 closed keepalive connection 84

解决办法

1[root@localhost ~]# vi /usr/local/nginx/conf/vhost/test.com.conf 2注释 3 48 fastcgi_pass unix:/tmp/php-fcgi.sock; 45 48 # fastcgi_pass unix:/tmp/php-fcgi.sock; 6添加 7 49 fastcgi_pass 127.0.0.1:9000; 89 1 server 10 2 { 11 3 listen 80; 12 4 server_name test.com test2.com test3.com; 13 5 index index.html index.htm index.php; 14 6 root /data/wwwroot/test.com; 15 7 16 8 if ( $host != 'test.com' ) { 17 9 rewrite ^/(.*)$ http://test.com/$1 permanent; 18 10 } 19 11 20 12 location ~* ^.+\.(gif|jpg|png|swf|flv|rar|zip|doc|pdf|gz|bz2|jpeg|bmp|xls)$ 21 13 { 22 14 expires 7d; 23 15 valid_referers none blocked server_names *.test.com; 24 16 if ($invalid_referer) { 25 17 return 403; 26 18 } 27 19 access_log off; 28 20 } 29 21 30 22 location ~ .*\.(js|css)$ 31 23 { 32 24 expires 12h; 33 25 access_log off; 34 26 } 35 27 36 28 location /admin/ 37 29 { 38 30 allow 127.0.0.1; 39 31 allow 192.168.81.133; 40 32 deny all; 41 33 } 42 34 43 35 location ~ .*(upload|image)/.*\.php$ 44 36 { 45 37 deny all; 46 38 } 47 39 48 40 if ($http_user_agent ~* 'Spider/3.0|YoudaoBot|Tomato') 49 41 { 50 42 return 403; 51 43 } 52 44 53 45 location ~ \.php$ 54 46 { 55 47 include fastcgi_params; 56 48 # fastcgi_pass unix:/tmp/php-fcgi.sock; 57 49 fastcgi_pass 127.0.0.1:9000; 58 50 fastcgi_index index.php; 59 51 fastcgi_param SCRIPT_FILENAME /data/wwwroot/test.com$fastcgi_script_name; 60 52 } 61 53 62 54 access_log /tmp/test.com.log user; 63 55 } 64 65 66 67[root@localhost ~]# /usr/local/nginx/sbin/nginx -t 68nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok 69nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful 70[root@localhost ~]# /usr/local/nginx/sbin/nginx -s reload 71[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 72 正常解析

问题三

1[root@localhost ~]# vi /usr/local/php-fpm/etc/php-fpm.conf 2取消注释 3 5 #listen = /tmp/php-fcgi.sock 45 5 listen = /tmp/php-fcgi.sock 6注释 7 6 #listen = 127.0.0.1:9000 8 7 #listen.mode = 666 910 1 [global] 11 2 pid = /usr/local/php-fpm/var/run/php-fpm.pid 12 3 error_log = /usr/local/php-fpm/var/log/php-fpm.log 13 4 [www] 14 5 listen = /tmp/php-fcgi.sock 15 6 #listen = 127.0.0.1:9000 16 7 #listen.mode = 666 17 8 user = php-fpm 18 9 group = php-fpm 19 10 pm = dynamic 20 11 pm.max_children = 50 21 12 pm.start_servers = 20 22 13 pm.min_spare_servers = 5 23 14 pm.max_spare_servers = 35 24 15 pm.max_requests = 500 25 16 rlimit_files = 1024 26 27 28[root@localhost ~]# vi /usr/local/php-fpm/etc/php-fpm.conf 29[global] 30pid = /usr/local/php-fpm/var/run/php-fpm.pid 31error_log = /usr/local/php-fpm/var/log/php-fpm.log 32[www] 33listen = /tmp/php-fcgi.sock 34#listen = 127.0.0.1:9000 35#listen.mode = 666 36user = php-fpm 37group = php-fpm 38pm = dynamic 39pm.max_children = 50 40pm.start_servers = 20 41pm.min_spare_servers = 5 42pm.max_spare_servers = 35 43pm.max_requests = 500 44rlimit_files = 1024 45 46 47 48[root@localhost ~]# /usr/local/php-fpm/sbin/php-fpm -t 49[02-Mar-2018 16:55:05] NOTICE: configuration file /usr/local/php-fpm/etc/php-fpm.conf test is successful 50[root@localhost ~]# /etc/init.d/php-fpm restart 51Gracefully shutting down php-fpm . done 52Starting php-fpm done 53[root@localhost ~]# ls -l /tmp/php-fcgi.sock 54srw-rw----. 1 root root 0 Mar 2 16:55 /tmp/php-fcgi.sock 55

这里sock为660,其他用户的权限都是0

1取消注释 2 48 # fastcgi_pass unix:/tmp/php-fcgi.sock; 34 48 fastcgi_pass unix:/tmp/php-fcgi.sock; 5注释 6 49 # fastcgi_pass 127.0.0.1:9000; 78 1 server 9 2 { 10 3 listen 80; 11 4 server_name test.com test2.com test3.com; 12 5 index index.html index.htm index.php; 13 6 root /data/wwwroot/test.com; 14 7 15 8 if ( $host != 'test.com' ) { 16 9 rewrite ^/(.*)$ http://test.com/$1 permanent; 17 10 } 18 11 19 12 location ~* ^.+\.(gif|jpg|png|swf|flv|rar|zip|doc|pdf|gz|bz2|jpeg|bmp|xls)$ 20 13 { 21 14 expires 7d; 22 15 valid_referers none blocked server_names *.test.com; 23 16 if ($invalid_referer) { 24 17 return 403; 25 18 } 26 19 access_log off; 27 20 } 28 21 29 22 location ~ .*\.(js|css)$ 30 23 { 31 24 expires 12h; 32 25 access_log off; 33 26 } 34 27 35 28 location /admin/ 36 29 { 37 30 allow 127.0.0.1; 38 31 allow 192.168.81.133; 39 32 deny all; 40 33 } 41 34 42 35 location ~ .*(upload|image)/.*\.php$ 43 36 { 44 37 deny all; 45 38 } 46 39 47 40 if ($http_user_agent ~* 'Spider/3.0|YoudaoBot|Tomato') 48 41 { 49 42 return 403; 50 43 } 51 44 52 45 location ~ \.php$ 53 46 { 54 47 include fastcgi_params; 55 48 fastcgi_pass unix:/tmp/php-fcgi.sock; 56 49 # fastcgi_pass 127.0.0.1:9000; 57 50 fastcgi_index index.php; 58 51 fastcgi_param SCRIPT_FILENAME /data/wwwroot/test.com$fastcgi_script_name; 59 52 } 60 53 61 54 access_log /tmp/test.com.log user; 62 55 } 63 64 65 66[root@localhost ~]# /usr/local/nginx/sbin/nginx -t 67nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok 68nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful 69[root@localhost ~]# /usr/local/nginx/sbin/nginx -s reload 70[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 71<html> 72<head><title>502 Bad Gateway</title></head> 73<body bgcolor="white"> 74<center><h1>502 Bad Gateway</h1></center> 75<hr><center>nginx/1.8.0</center> 76</body> 77</html> 78[root@localhost ~]# tail /usr/local/nginx/logs/nginx_error.log 792018/03/02 17:00:12 [notice] 7529#0: exit 802018/03/02 17:00:12 [notice] 7530#0: exit 812018/03/02 17:00:12 [notice] 7417#0: signal 17 (SIGCHLD) received 822018/03/02 17:00:12 [notice] 7417#0: worker process 7529 exited with code 0 832018/03/02 17:00:12 [notice] 7417#0: worker process 7530 exited with code 0 842018/03/02 17:00:12 [notice] 7417#0: signal 29 (SIGIO) received 852018/03/02 17:00:12 [notice] 7417#0: signal 17 (SIGCHLD) received 862018/03/02 17:01:33 [notice] 7587#0: *9 "Spider/3.0|YoudaoBot|Tomato" does not match "curl/7.29.0", client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", host: "test.com" 872018/03/02 17:01:33 [crit] 7587#0: *9 connect() to unix:/tmp/php-fcgi.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: test.com, request: "GET HTTP://test.com/test.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fcgi.sock:", host: "test.com" 882018/03/02 17:01:33 [info] 7587#0: *9 client 127.0.0.1 closed keepalive connection 89

解决办法

1[root@localhost ~]# ps aux | grep nginx 2root 7417 0.0 0.0 26124 1780 ? Ss 16:07 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 3nobody 7587 0.0 0.2 27956 4108 ? S 17:00 0:00 nginx: worker process 4nobody 7588 0.0 0.1 27956 3600 ? S 17:00 0:00 nginx: worker process 5root 7626 0.0 0.0 112664 976 pts/0 S+ 17:04 0:00 grep --color=auto nginx 6[root@localhost ~]# chown nobody /tmp/php-fcgi.sock 7[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 8 正常解析

1[root@localhost ~]# vi /usr/local/php-fpm/etc/php-fpm.conf 2取消注释 3 7 listen.mode = 666 45 1 [global] 6 2 pid = /usr/local/php-fpm/var/run/php-fpm.pid 7 3 error_log = /usr/local/php-fpm/var/log/php-fpm.log 8 4 [www] 9 5 listen = /tmp/php-fcgi.sock 10 6 #listen = 127.0.0.1:9000 11 7 listen.mode = 666 12 8 user = php-fpm 13 9 group = php-fpm 14 10 pm = dynamic 15 11 pm.max_children = 50 16 12 pm.start_servers = 20 17 13 pm.min_spare_servers = 5 18 14 pm.max_spare_servers = 35 19 15 pm.max_requests = 500 20 16 rlimit_files = 1024 21[root@localhost ~]# /etc/init.d/php-fpm restart 22Gracefully shutting down php-fpm . done 23Starting php-fpm done 24[root@localhost ~]# ls -l /tmp/php-fcgi.sock 25srw-rw-rw-. 1 root root 0 Mar 2 17:13 /tmp/php-fcgi.sock 26 27[root@localhost ~]# curl -x 127.0.0.1:80 test.com/test.php 28 正常解析
点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

2020年前端实用代码段,为你的工作保驾护航

有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )