$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"; // 以上代码最好全放在一个包含文件中 $article = new WHXBB_Article(); $result = $artcile->Insert(today's weather, whxbb, there is rain in some areas of Beijing today); // If an error occurs, an error message pops up and returns to the previous page (input page) if (WHXBB::isError($result)) { new WHXBB_Error(" Error: " . $result->GetMsg() . "(" . $result->GetNo . ")", 1, WHXBB_ERROR_ALERT + WHXBB_ERROR_RETURN); // Or the following custom error //new WHXBB_Error("Add failed, please Please try again later", 1, WHXBB_ERROR_ALERT + WHXBB_ERROR_RETURN); } else { JS::Alert("Added successfully"); // Jump to the specified page JS:Goto("add.php"); } ?>