1.conn.php
<?php
$conn=mysql_connect('localhost','root','')or die('连接失败!'.mysql_error());
if(mysql_select_db('dedecmsv57',$conn)){
echo "";}
else{
echo ('数据库选择失败:'.mysql_error()); }
?>
2.index.php
<?php
include_once 'conn.php';
$result=mysql_query("select * from dede_addonarticle",$conn);
while($myrow=mysql_fetch_array($result))
{
echo $myrow[body];
}
?>