WP-Stattraq中Summary頁中文標題亂碼的解决

  WP-Stattraq是一个和WordPress结合的很好的访问统计插件,但是在Summary报告页面上中文标题的文章会显示为乱码,解决方法如下:
  查找/wp-stattraq/reporter/summary.php文件的line 140中的:
[php]< ?php echo htmlentities(stripslashes($row->post_title));?>[/php]
修改为:
[php]< ?php echo stripslashes($row->post_title);?>[/php]
  我并没有学习过php,所以去掉htmlentities()后会不会有不良后果就不太清楚了,请有相关知识的朋友解解惑。
  刚才发现Search Terms页面也有乱码,修改如下:
  查找/wp-stattraq/reporter/query_strings.php文件的line 88中的:
[php]htmlentities ($row->search_phrase)[/php]
修改为:
[php]stripslashes($row->search_phrase)[/php]

Update: 原来有人已经做过同样的修改了,这篇文章比我的详细多了。

Technorati Tags: , , ,

9 Responses to “WP-Stattraq中Summary頁中文標題亂碼的解决”

Leave a Reply

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).