私の phpbb3 フォーラムでは、mySQL を使用する代わりに、通常の「notepad.txt ファイルから手動で作成され、phpbb3 によって入力された database.db ファイル」である SQlite 2 を使用しています。 MySQLの。
このスクリプトを実行すると、エコーが表示されます: 最近の投稿 (行 3 にあります) 以外には何もありません
私はPHPの完全な初心者ですので、Plz Help、私は運がなくても1週間それを続けています
最終的には、自分の Web サイトで Phpbb3 以外の html をサポートする Adobe Flash Dynamic txt ボックスに最新の 15 件の投稿を表示したい
enter code here
<?php
$db = sqlite_open("Mydatabasenamehere.db", 0666, $sqliteerror);
echo "Recent Posts<p />";
$recent = sqlite_query($db, "SELECT * FROM * phpbb_posts ORDER BY post_time DESC LIMIT 15");
while ($recent_row = sqlite_fetch_all($recent, SQLITE_ASSOC))
{
// get data
$post_id = $recent_row['post_id'];
$topic_id = $recent_row['topic_id'];
$forum_id = $recent_row['forum_id'];
$poster_id = $recent_row['poster_id'];
$post_time = $recent_row['post_time'];
// get topic name
$topic_name = sqlite_query($db, "SELECT topic_title FROM phpbb_topics WHERE topic_id='$topic_id'");
$topic_name = sqlite_fetch_all($topic_name);
$topic_name = $topic_name('topic_title');
// get username
$username = sqlite_query($db, "SELECT username FROM phpbb_users WHERE user_id='$poster_id'");
$username = sqlite_fetch_all($username);
$username = $username['username'];
//var for flash
//$toflash = "<b><a href='http://microfusion.mine.nu/forums/memberlist.php?mode=viewprofile&u=$poster_id'></a>$username</b> Posted in \"<a href='http://microfusion.mine.nu/forums/viewtopic.php?$forum_id1&t=$topic_id&p=post_id#p$post_id'>$topic_name\"</a><br />";
//echo "RecPos.$toflash";
//to test first before flash integration
echo "$username Posted in $topic_name<br />";
}
?>