Dz3.1 added a blank code webpage to the forum.

Source: Internet
Author: User
In the dz3.1 Forum, a code webpage is blank. this post is finally edited by seqq001 from 2014-06-1213:13:00 sourcemoduleforumforum_forumdisplay.php to add $ query & nbsp; $ db-& gt; query (select & nbsp; * & nbs dz3.1 add a blank code webpage to the Forum

This post was last edited by seqq001 at 13:13:00

Add source \ module \ forum \ forum_forumdisplay.php
$query = $db->query("select * from bbs_forum_post where tid ='$tid' ");
while($result = $db->fetch_array($query)) {
$mythread[] = $result;
}

Add

{$ Val [message]}


The website page is blank. why?

------ Solution --------------------
1. open and view error logs
2. print related variables to see which line has an error
$ Db does not exist. dx3 does not support this method later.
------ Solution --------------------
Discuz has its own database class which encapsulates many methods including security filtering.

$ Query = $ db-> query ("select * from bbs_forum_post where tid = '$ tid '");
While ($ result = $ db-> fetch_array ($ query )){
$ Mythread [] = $ result;
}

Change this section

$ Tid = intval ($ tid );
$ Mythread = DB: fetch_all ('select * from '. DB: table ('forum _ Post'). 'where tid = $ tid ');

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.