Home >Backend Development >PHP Tutorial >Seven Examples of Obtaining Information_PHP Tutorial

Seven Examples of Obtaining Information_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:24:28794browse

$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); ?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532128.htmlTechArticleGetInfo(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(What you need is not found...
Statement:
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