Home > php教程 > php手册 > typecho Stat 插件的小BUG

typecho Stat 插件的小BUG

WBOY
Release: 2016-06-06 20:13:18
Original
1338 people have browsed it

在使用Stat插件时,发现代码中存在一个小BUG,是对Columns not found的判断有问题,原代码写的是: 'Mysql'?==?$type??1051?==?$code?? 但事实上,如果你使用的是PDO,$code 还应该加上 42S22,所以上述代码就应该改成这样了 ('Mysql'?==?$type??(1054?==?$c

在使用Stat插件时,发现代码中存在一个小BUG,是对Columns not found的判断有问题,原代码写的是:

    'Mysql'?==?$type?&&?1051?==?$code??
Copy after login

但事实上,如果你使用的是PDO,$code 还应该加上 42S22,所以上述代码就应该改成这样了

    ('Mysql'?==?$type?&&?(1054?==?$code?||?$code?==?'42S22'))??
Copy after login

然后就可以安装成功了。

该插件的信息是:

    /**??
    ?*?页面浏览次数统计插件??
    ?*?@package????Stat??
    ?*?@author?????Hanny??
    ?*?@version????1.0.2??
    ?*?@dependence?10.8.15-*??
    ?*?@link???????http://www.imhan.com??
    ?*?历史版本??
    ?*?version?1.0.2?at?2010-07-03??
    ?*?终于支持前台调用了??
    ?*?接口支持Typecho?0.8的计数??
    ?*?增加SQLite的支持??
    ?*?version?1.0.1?at?2010-01-02??
    ?*?修改安装出错处理??
    ?*?修改安装时默认值错误??
    ?*?version?1.0.0?at?2009-12-12??
    ?*?实现浏览次数统计的基本功能??
    ??
    ?*/??
Copy after login

不过由于这个版本比较早,就将就一下啦

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template