Home >Backend Development >PHP Tutorial >Seven Examples of Obtaining Information_PHP Tutorial
$conn = @mysql_connect(localhost:3306,test,test); include_once "js.class.php"; include_once "pager.class.php"; include_once "whxbb.class.php"; include_once "whxbb_article.class.php"; // 以上代码最好全放在一个包含文件中 // 显示ID为3的记录的所有字段信息 $article = new Article(); $info = $article->GetInfo(3); if (WHXBB::isError($info)) new WHXBB_Error("Failed to read article information, please try again later", 1, WHXBB_ERROR_ECHO); else if($info == 0 ) new WHXBB_Error("The record you need was not found", 2, WHXBB_ERROR_ECHO); else { echo $info[title]; echo "
"; echo "Author:" . $info[author]; echo "
"; echo $info[content]; } @mysql_close($conn); ?>