打开 /lib/Varien/Db/Adapter/Pdo/Mysql.php
大约在45行,搜索代码:
protected $_debug =
false;
修改为代码:
protected $_debug =
true;
看该类的一个变量
代码:
[_debugFile:protected] =>
var/debug/sql.txt (输出路径)
随便运行Magento的一个页面,打开sql.txt看输出