nginx实战六
Nginx错误日志
https://coding.net/u/aminglinux/p/nginx/git/blob/master/log/error.md
Nginx错误日志平时不用太关注,但是一旦出了问题,就需要借助错误日志来判断问题所在。 配置参数格式:error_log /path/to/log level;
常见的错误日志级别有debug | info | notice | warn | error | crit | alert | emerg
级别越高记录的信息越少,如果不定义,默认级别为error. 它可以配置在main、http、server、location段里。 如果在配置文件中定义了两个error_log,在同一个配置段里的话会产生冲突,所以同一个段里只允许配置一个error_log。
但是,在不同的配置段中出现是没问题的。
error_log /var/log/nginx/error.log crit; 如果要想彻底关闭error_log,需要这样配置
error_log /dev/null;
1.实验:编辑nginx主配置文件将error级别配置为crit
[root@centos-03 conf]# vim nginx.conf
#error_log logs/error.log;
error_log logs/error.log crit;
#error_log logs/error.log info;
[root@centos-03 conf]# vim vhost/1.conf
server {
listen 80;
server_name www.123.com;
index index.html;
root /data/wwwroot/www.1.com;
rewrite_log on;
location /
{
rewrite /123.html /1.html redirect;
error_log /tmp/nginx.err debug;
}
}
[root@centos-03 conf]# /usr/local/nginx/sbin/nginx -s reload
[root@centos-03 conf]#
2.清空日志内容
[root@centos-03 conf]# > /tmp/nginx.err
[root@centos-03 conf]# > /usr/local/nginx/logs/error.log
[root@centos-03 conf]#
3.我们访问一个不存在的文件,错误日志没有记录,虚拟主机定义的有记录
[root@centos-03 conf]# curl www.123.com/123
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 conf]# cat /usr/local/nginx/logs/error.log
[root@centos-03 conf]# cat /tmp/nginx.err
2018/07/28 16:07:53 [notice] 29883#0: *71 "/123.html" does not match "/123", client: 127.0.0.1, server: www.123.com, request: "GET /123 HTTP/1.1", host: "www.123.com"
2018/07/28 16:07:53 [error] 29883#0: *71 open() "/data/wwwroot/www.1.com/123" failed (2: No such file or directory), client: 127.0.0.1, server: www.123.com, request: "GET /123 HTTP/1.1", host:
"www.123.com"
2018/07/28 16:07:53 [info] 29883#0: *71 client 127.0.0.1 closed keepalive connection
[root@centos-03 conf]#
[root@centos-03 conf]# curl www.123.com/123.html
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 conf]# cat /tmp/nginx.err
2018/07/28 16:07:53 [notice] 29883#0: *71 "/123.html" does not match "/123", client: 127.0.0.1, server: www.123.com, request: "GET /123 HTTP/1.1", host: "www.123.com"
2018/07/28 16:07:53 [error] 29883#0: *71 open() "/data/wwwroot/www.1.com/123" failed (2: No such file or directory), client: 127.0.0.1, server: www.123.com, request: "GET /123 HTTP/1.1", host:
"www.123.com"
2018/07/28 16:07:53 [info] 29883#0: *71 client 127.0.0.1 closed keepalive connection
2018/07/28 16:10:30 [notice] 29883#0: *72 "/123.html" matches "/123.html", client: 127.0.0.1, server: www.123.com, request: "GET /123.html HTTP/1.1", host: "www.123.com"
2018/07/28 16:10:30 [notice] 29883#0: *72 rewritten redirect: "/1.html", client: 127.0.0.1, server: www.123.com, request: "GET /123.html HTTP/1.1", host: "www.123.com"
2018/07/28 16:10:30 [info] 29883#0: *72 client 127.0.0.1 closed keepalive connection
[root@centos-03 conf]#
Nginx访问日志-日志格式
https://coding.net/u/aminglinux/p/nginx/git/blob/master/log/format.md
https://coding.net/u/aminglinux/p/nginx/git/blob/master/log/acclog.md
Nginx访问日志格式
Nginx访问日志可以设置自定义的格式,来满足特定的需求。
访问日志格式示例
示例1
log_format combined_realip '$remote_addr $http_x_forwarded_for [$time_local]'
'$host "$request_uri" $status'
'"$http_referer" "$http_user_agent"'; 示例2
log_format main '$remote_addr [$time_local] '
'$host "$request_uri" $status "$request"'
'"$http_referer" "$http_user_agent" "$request_time"'; 若不配置log_format或者不在access_log配置中指定log_format,则默认格式为:
'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent";
常见变量
变量 说明
$time_local 通用日志格式下的本地时间;(服务器时间)
$remote_addr 客户端(用户)IP地址
$status 请求状态码,如200,404,301,302等
$body_bytes_sent 发送给客户端的字节数,不包括响应头的大小
$bytes_sent 发送给客户端的总字节数
$request_length 请求的长度(包括请求行,请求头和请求正文)
$request_time 请求处理时间,单位为秒,小数的形式
$upstream_addr 集群轮询地址
$upstream_response_time 指从Nginx向后端(php-cgi)建立连接开始到接受完数据然后关闭连接为止的时间
$remote_user 用来记录客户端用户名称
$request 请求方式(GET或者POST等)+URL(包含$request_method,$host,$request_uri)
$http_user_agent 用户浏览器标识
$http_host 请求的url地址(目标url地址)的host
$host 等同于$http_host
$http_referer 来源页面,即从哪个页面转到本页,如果直接在浏览器输入网址来访问,则referer为空
$uri 请求中的当前URI(不带请求参数,参数位于$args),不同于浏览器传递的$request_uri的值,它可以通过内部重定向,或者使用index指令进行修改。
$document_uri 等同于$uri
$request_uri 比$uri多了参数,即$uri+$args
$http_x_forwarded_for 如果使用了代理,这个参数会记录代理服务器的ip和客户端的ip
实验:
1.查看或编辑nginx主配置文件
[root@centos-03 conf]# vim nginx.conf
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $host $server_
port';
2.配置虚拟主机的访问日志文件
[root@centos-03 conf]# vim vhost/1.conf
server {
listen 80;
server_name www.123.com;
index index.html;
root /data/wwwroot/www.1.com;
rewrite_log on;
location /
{
rewrite /123.html /1.html redirect;
error_log /tmp/nginx.err debug;
access_log /tmp/123.com.log main;
}
}
3.测试
[root@centos-03 conf]# /usr/local/nginx/sbin/nginx -s reload
[root@centos-03 conf]# curl www.123.com/123.html
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 conf]# cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
[root@centos-03 conf]#
配置Nginx访问日志
1.生产机上访问日记格式加上$http_x_forwarded_for这样就可以接收到代理ip了
实验:编辑配置文件为8080端口
root@centos-03 vhost]# vim 1.conf
server {
listen ;
server_name www.123.com;
index index.html;
root /data/wwwroot/www.1.com;
rewrite_log on;
location /
{
rewrite /123.html /1.html redirect;
error_log /tmp/nginx.err debug;
access_log /tmp/123.com.log main;
}
}
2.新建代理虚拟主机
[root@centos-03 vhost]# vim proxy.conf
server
{
listen 80;
server_name www.123.com; location /
{
proxy_pass http://192.168.242.133:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
[root@centos-03 vhost]# /usr/local/nginx/sbin/nginx -s reload
[root@centos-03 vhost]# curl -x127.0.0.1:8080 www.123.com/123.html (不用代理访问)
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 vhost]# cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
127.0.0.1 - - [28/Jul/2018:17:50:37 +0800] "GET HTTP://www.123.com/123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 8080
[root@centos-03 vhost]#
[root@centos-03 vhost]# curl -x127.0.0.1:80 www.123.com/123.html (代理访问)
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 vhost]# cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
127.0.0.1 - - [28/Jul/2018:17:50:37 +0800] "GET HTTP://www.123.com/123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:17:52:23 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1" www.123.com 8080
[root@centos-03 vhost]#
3.再加一层代理试试能获取到ip吗
[root@centos-03 vhost]# vim proxy2.conf
server
{
listen 8000;
server_name www.123.com; location /
{
proxy_pass http://192.168.242.133/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
4.用8000端口访问
[root@centos-03 vhost]# /usr/local/nginx/sbin/nginx -s reload
[root@centos-03 vhost]# curl -x127.0.0.1:8000 www.123.com/123.html
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 vhost]# !cat
cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
127.0.0.1 - - [28/Jul/2018:17:50:37 +0800] "GET HTTP://www.123.com/123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:17:52:23 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:18:06:21 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1, 192.168.242.133" www.123.com 8080
[root@centos-03 vhost]#
Nginx日志过滤指定文件
https://coding.net/u/aminglinux/p/nginx/git/blob/master/log/filter.md
一个网站,会包含很多元素,尤其是有大量的图片、js、css等静态元素。
这样的请求其实可以不用记录日志。
location ~* ^.+\.(gif|jpg|png|css|js)$
{
access_log off;
} 或
location ~* ^.+\.(gif|jpg|png|css|js)$
{
access_log /dev/null;
}
实验:
[root@centos-03 vhost]# vim 1.conf
server {
listen 8080;
server_name www.123.com;
index index.html;
root /data/wwwroot/www.1.com;
rewrite_log on;
location /
{
rewrite /123.html /1.html redirect;
error_log /tmp/nginx.err debug;
}
location ~* '(css|js|png|jpg|gif|rar|mp4)$'
{
access_log off;
#access_log /dev/null;
}
access_log /tmp/123.com.log main;
}
访问测试,我们访问css的文件时没有记录日志,访问css1记录了日志
[root@centos-03 vhost]# curl -x127.0.0.1:8000 www.123.com/123.css
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 vhost]# !cat
cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
127.0.0.1 - - [28/Jul/2018:17:50:37 +0800] "GET HTTP://www.123.com/123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:17:52:23 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:18:06:21 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1, 192.168.242.133" www.123.com 8080
[root@centos-03 vhost]#
[root@centos-03 vhost]# curl -x127.0.0.1:8000 www.123.com/123.css1
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.14.0</center>
</body>
</html>
[root@centos-03 vhost]# cat /tmp/123.com.log
127.0.0.1 - - [28/Jul/2018:17:09:52 +0800] "GET /123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 80
127.0.0.1 - - [28/Jul/2018:17:50:37 +0800] "GET HTTP://www.123.com/123.html HTTP/1.1" 302 161 "-" "curl/7.29.0" "-" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:17:52:23 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:18:06:21 +0800] "GET /123.html HTTP/1.0" 302 161 "-" "curl/7.29.0" "127.0.0.1, 192.168.242.133" www.123.com 8080
192.168.242.133 - - [28/Jul/2018:18:31:14 +0800] "GET /123.css1 HTTP/1.0" 404 169 "-" "curl/7.29.0" "127.0.0.1, 192.168.242.133" www.123.com 8080
[root@centos-03 vhost]#
Nginx日志切割
https://coding.net/u/aminglinux/p/nginx/git/blob/master/log/rotate.md
如果任由访问日志写下去,日志文件会变得越来越大,甚至是写满磁盘。
所以,我们需要想办法把日志做切割,比如每天生成一个新的日志,旧的日志按规定时间删除即可。 实现日志切割可以通过写shell脚本或者系统的日志切割机制实现。
shell脚本切割Nginx日志
切割脚本内容:
#!/bin/bash
logdir=/var/log/nginx //定义日志路径
prefix=`date -d "-1 day" +%y%m%d` //定义切割后的日志前缀
cd $logdir
for f in `ls *.log`
do
mv $f $f-$prefix //把日志改名
done
/bin/kill -USR1 $(cat /usr/local/nginx/logs/nginx.pid 2>/dev/null) 2>/dev/null //生成新的日志
bzip2 *$prefix //压缩日志
find . -type f -mtime +180 |xargs /bin/rm -f //删除超过180天的老日志
系统日志切割机制
在/etc/logrotate.d/下创建nginx文件,内容为:
/data/logs/*log {
daily
rotate 30
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -USR1 $(cat /usr/local/nginx/logs/nginx.pid 2>/dev/null) 2>/dev/null || :
endscript
} 说明:
1 nginx日志在/data/logs/目录下面,日志名字以log结尾
2 daily表示每天切割
3 rotate 30表示日志保留30天
4 missingok表示忽略错误
5 notifempty表示如果日志为空,不切割
6 compress表示压缩
7 sharedscripts和endscript中间可以引用系统的命令
8 postrotate表示当切割之后要执行的命令
实验:
1.日志切割不仅仅是访问日志、错误日志也应该切割,日志切割最好是把所有的日志集中在一个目录下,我们这里把所有的日志放到data/logs下
[root@centos-03 ~]# cd /usr/local/nginx/conf/vhost/
[root@centos-03 vhost]# mkdir /data/logs/
[root@centos-03 vhost]#
2.给每个虚拟主机配置日志文件
[root@centos-03 vhost]# vim 1.conf
server {
listen 8080;
server_name www.123.com;
index index.html;
root /data/wwwroot/www.1.com;
rewrite_log on;
location /
{
rewrite /123.html /1.html redirect;
error_log /data/logs/123.com.err.log debug;
}
location ~* '(css|js|png|jpg|gif|rar|mp4)$'
{
access_log off;
#access_log /dev/null;
}
access_log /data/logs/123.com.acc.log main;
}
3.测试是否生成新的日志文件
[root@centos-03 vhost]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@centos-03 vhost]# /usr/local/nginx/sbin/nginx -s reload
[root@centos-03 vhost]# ls /data/logs/
123.com.acc.log 123.com.err.log
[root@centos-03 vhost]# curl -x127.0.0.1:8000 www.123.com/123 -I
HTTP/1.1 404 Not Found
Server: nginx/1.14.0
Date: Sat, 28 Jul 2018 13:03:47 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive [root@centos-03 vhost]#
[root@centos-03 vhost]# cd /data/logs/
[root@centos-03 logs]# ls
123.com.acc.log 123.com.err.log
[root@centos-03 logs]# cat *
192.168.242.133 - - [28/Jul/2018:21:03:47 +0800] "HEAD /123 HTTP/1.0" 404 0 "-" "curl/7.29.0" "127.0.0.1, 192.168.242.133" www.123.com 8080
2018/07/28 21:03:47 [notice] 30143#0: *99 "/123.html" does not match "/123", client: 192.168.242.133, server: www.123.com, request: "HEAD /123 HTTP/1.0", host: "www.123.com"
2018/07/28 21:03:47 [error] 30143#0: *99 open() "/data/wwwroot/www.1.com/123" failed (2: No such file or directory), client: 192.168.242.133, server: www.123.com, request: "HEAD /123 HTTP/1.0"
, host: "www.123.com"
[root@centos-03 logs]#
4.做日志切割
方法一:
[root@centos-03 logs]# vim /usr/local/nginx/sbin/log_rotate.sh
#!/bin/bash
logdir=/data/logs/
prefix=`date -d "-1 day" +%y%m%d`
cd $logdir
for f in `ls *.log`
do
mv $f $f-$prefix
done
/bin/kill -USR1 $(cat /usr/local/nginx/logs/nginx.pid 2>/dev/null) 2>/dev/null (USR1亦通常被用来告知应用程序重载配置文件;例如,向Apache HTTP服务器发送一个USR1信号将导致以下步骤的发生:停止接受新的连接,
等待当前连接停止,重新载入配置文件,重新打开日志文件,重启服务器,从而实现相对平滑的不关机的更改。)
bzip2 *$prefix
find . -type f -mtime +180 |xargs /bin/rm -f
[root@centos-03 logs]# sh -x /usr/local/nginx/sbin/log_rotate.sh
+ logdir=/data/logs/
++ date -d '-1 day' +%y%m%d
+ prefix=180727
+ cd /data/logs/
++ ls 123.com.acc.log 123.com.err.log
+ for f in '`ls *.log`'
+ mv 123.com.acc.log 123.com.acc.log-180727
+ for f in '`ls *.log`'
+ mv 123.com.err.log 123.com.err.log-180727
++ cat /usr/local/nginx/logs/nginx.pid
+ /bin/kill -USR1 29709
+ bzip2 123.com.acc.log-180727 123.com.err.log-180727
+ xargs /bin/rm -f
+ find . -type f -mtime +180
[root@centos-03 logs]# ls
123.com.acc.log 123.com.err.log
123.com.acc.log-180727.bz2 123.com.err.log-180727.bz2
[root@centos-03 logs]#
[root@centos-03 logrotate.d]# crontab -e
0 0 * * * /bin/bash /usr/local/nginx/sbin/log_rotate.sh
方法二
[root@centos-03 logrotate.d]# cd /etc/logrotate.d/
[root@centos-03 logrotate.d]# vim nginx
/data/logs/*log {
daily
rotate 30
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -USR1 $(cat /usr/local/nginx/logs/nginx.pid 2>/dev/null) 2>/de
v/null || :
endscript
}
nginx实战六的更多相关文章
- 深入浅出Nginx实战与架构
本文主要内容如下(让读者朋友们深入浅出地理解Nginx,有代码有示例有图): 1.Nginx是什么? 2.Nginx具有哪些功能? 3.Nginx的应用场景有哪些? 4.Nginx的衍生生态有哪些? ...
- nginx实战
原文:http://www.cnblogs.com/yucongblog/p/6289628.html nginx实战 (一) nginx环境的搭建安装流程: 1 通过ftp将nginx-1.11 ...
- Nginx实战之让用户通过用户名密码认证访问web站点
1.Nginx实战之让用户通过用户名密码认证访问web站点 [root@master ~]# vim /usr/local/nginx/conf/extra/www.conf server { lis ...
- Python爬虫实战六之抓取爱问知识人问题并保存至数据库
大家好,本次为大家带来的是抓取爱问知识人的问题并将问题和答案保存到数据库的方法,涉及的内容包括: Urllib的用法及异常处理 Beautiful Soup的简单应用 MySQLdb的基础用法 正则表 ...
- SpringSecurity权限管理系统实战—六、SpringSecurity整合jwt
目录 SpringSecurity权限管理系统实战-一.项目简介和开发环境准备 SpringSecurity权限管理系统实战-二.日志.接口文档等实现 SpringSecurity权限管理系统实战-三 ...
- miniFTP项目实战六
项目简介: 在Linux环境下用C语言开发的Vsftpd的简化版本,拥有部分Vsftpd功能和相同的FTP协议,系统的主要架构采用多进程模型,每当有一个新的客户连接到达,主进程就会派生出一个ftp服务 ...
- C# Redis实战(六)
六.查询数据 在C# Redis实战(五)中介绍了如何删除Redis中数据,本篇将继续介绍Redis中查询的写法. 1.使用Linq匹配关键字查询 using (var redisClient = R ...
- Dockerfile之nginx(六)
一.Dokcerfile的基本指令 1)From 指定构建镜像的基础镜像 2)MAINTAINER 指定镜像的作者 3)RUN 使用前一条指令创建的镜像生产容器,并在容器中执行命令,执行结束后会自 ...
- nginx实战二
nginx架构分析 1.nginx模块化 Nginx涉及到的模块分为核心模块.标准HTTP模块.可选HTTP模块.邮件服务模块以及第三方模块等五大类. https://coding.net/u/ami ...
随机推荐
- Spring Boot应用连接数据库MySQL、及一个简单的demo
一.修改pom.xml文件 在项目的pom.xml文件上增加如下代码,添加依赖文件. <dependency> <groupId>mysql</groupId> & ...
- jquery获得select option的值和对select option的操作
<body> <select name="month" id="selMonth" onchange="set()"> ...
- 转: python _main_ _name_的说明
转:http://www.cnblogs.com/xuxm2007/archive/2010/08/04/1792463.html python中if __name__ == '__main__': ...
- [Functional Programming] Fst & Snd, Code interview question
cons(a, b) constructs a pair, and car(pair) and cdr(pair) returns the first and last element of that ...
- html5游戏驴子跳
在线演示 免费下载 分享一款HTML5开发的游戏,放松一下吧大家吧
- 如何使用Flash抓抓狂抓取网页Flash
运行该软件,如果把鼠标移动到flash的部位浏览器左边顶部没有出现保存按钮,则定位到这个Flash,右击选择播放,暂停,反复一次即可看到. 把flash暂停再播放即可. 如果是QQ空间的漂亮的背景,不 ...
- 【OpenCV新手教程之十七】OpenCV重映射 & SURF特征点检測合辑
本系列文章由@浅墨_毛星云 出品.转载请注明出处. 文章链接:http://blog.csdn.net/poem_qianmo/article/details/30974513 作者:毛星云(浅墨) ...
- PHP高级教程-安全邮件
PHP Secure E-mails 在上一节中的 PHP e-mail 脚本中,存在着一个漏洞. PHP E-mail 注入 首先,请看上一章中的 PHP 代码: <html> < ...
- ora01219数据库未打开
今天连接数据后,一看提示ora01219数据库未打开,关了服务重开仍然是这样,在度娘找了下才发现问题 应该是我删除了一个数据文件,看下解决办法 错误原因: 直接关闭数据库,然后删除DBF文件.即表空间 ...
- request.getSession().setAttribute("",..)和request.setAttribute("",...)的差别
request.getSession.setAttribute()是获得当前会话的session,然后再setAttribute到session里面去,有效范围是session而不是request. ...