呼叫程式碼
<script></script>
js_bbs.php(放在根目錄下) 內容
require ("bbs/config.inc.php");
//連接,選擇資料庫
$link = mysql_connect( $dbhost,$dbuser,$dbpw) or die('Couldnot connect '. mysql_error());
mysql_select_db($dbname) or die("Could not elect database");
$fid=$_GET["fid"]; length=36;
//防止中文亂碼
mysql_query("set names 'gb2312'");
//執行SQL查詢
$query = "SELECT '$fid' order by lastpost desc LIMIT 10";
$result = mysql_query($query) or die("Query failed: ".myferror()) or die("Query failed: ".mym_error()); ($myrow = mysql_fetch_row($result))
{
printf("document.writeln("