<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<body bgcolor="#F2F6E8" leftmargin="0" topmargin="0">
<?
$database_link =mysql_connect("localhost","root","");
mysql_select_db("fin230",$database_link);
$query = "select * from thread order by replycount desc";
$result =mysql_query($query,$database_link);
$i=1;
?>
<table width="1009" border="0" cellspacing="0" cellpadding="2" onMouseOver="this.style.cursor='hand'">
<?
while($row =mysql_fetch_row($result))
{
if($i<=7){
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<?
print "<a href=http://campus.stu.edu.cn/forum/showthread.php?threadid=".$row[0]." target=_blank><td width=1003 onMouseOver=\"this.style.backgroundColor=''\" onMouseOut=\"this.style.backgroundColor=''\">";
print " :: <font color='#FF6600'>".$row[1]."</font>";
print "</a></td>";
?>
</tr>
<?
$i++;
}
}
mysql_close($database_link);
?>
<table width="1009" border="0" cellspacing="0" cellpadding="2" onMouseOver="this.style.cursor='hand'">
<?
while($row =mysql_fetch_row($result))
{
$count=$row[6];
$title=$row[7];
$pos=strrpos($title,"[/QUOTE]");
if($pos!=0){
$title=substr($title,$pos+8,(strlen($title)-1));
}
if(strlen($title)>=70){
$title=substr($title,0,70).".....";
}
if($row[6]!=0){
$img="[包含图片]";
}else{
$img="";
}
if($i<=4){
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<?
print "<a href=http://campus.stu.edu.cn/forum/showthread.php?postid=".$row[0]."#post".$row[0]." target=_blank><td width=1003 onMouseOver=\"this.style.backgroundColor=''\" onMouseOut=\"this.style.backgroundColor=''\">";
print " :: <font color='#FF6600'>".$title."</font>".$img."<font color='#040404'>(此主题被回复:".$count.")</font>";
print "</a></td>";
?>
</tr>
<?
$i++;
//}
}
}
mysql_close($database_link);
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<a href="http://campus.stu.edu.cn/forum" target="_blank" ><td align="left"> 更多...</td></a>
</tr>
</table>
</table>
这是php代码,这个页面功能是提取论坛里的几条更新数据my.ini我看了,没有问题
<link href="css.css" rel="stylesheet" type="text/css">
<body bgcolor="#F2F6E8" leftmargin="0" topmargin="0">
<?
$database_link =mysql_connect("localhost","root","");
mysql_select_db("fin230",$database_link);
$query = "select * from thread order by replycount desc";
$result =mysql_query($query,$database_link);
$i=1;
?>
<table width="1009" border="0" cellspacing="0" cellpadding="2" onMouseOver="this.style.cursor='hand'">
<?
while($row =mysql_fetch_row($result))
{
if($i<=7){
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<?
print "<a href=http://campus.stu.edu.cn/forum/showthread.php?threadid=".$row[0]." target=_blank><td width=1003 onMouseOver=\"this.style.backgroundColor=''\" onMouseOut=\"this.style.backgroundColor=''\">";
print " :: <font color='#FF6600'>".$row[1]."</font>";
print "</a></td>";
?>
</tr>
<?
$i++;
}
}
mysql_close($database_link);
?>
<table width="1009" border="0" cellspacing="0" cellpadding="2" onMouseOver="this.style.cursor='hand'">
<?
while($row =mysql_fetch_row($result))
{
$count=$row[6];
$title=$row[7];
$pos=strrpos($title,"[/QUOTE]");
if($pos!=0){
$title=substr($title,$pos+8,(strlen($title)-1));
}
if(strlen($title)>=70){
$title=substr($title,0,70).".....";
}
if($row[6]!=0){
$img="[包含图片]";
}else{
$img="";
}
if($i<=4){
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<?
print "<a href=http://campus.stu.edu.cn/forum/showthread.php?postid=".$row[0]."#post".$row[0]." target=_blank><td width=1003 onMouseOver=\"this.style.backgroundColor=''\" onMouseOut=\"this.style.backgroundColor=''\">";
print " :: <font color='#FF6600'>".$title."</font>".$img."<font color='#040404'>(此主题被回复:".$count.")</font>";
print "</a></td>";
?>
</tr>
<?
$i++;
//}
}
}
mysql_close($database_link);
?>
<tr onMouseOver="this.style.backgroundColor='#DAEBB5'" onMouseOut="this.style.backgroundColor=''">
<a href="http://campus.stu.edu.cn/forum" target="_blank" ><td align="left"> 更多...</td></a>
</tr>
</table>
</table>
这是php代码,这个页面功能是提取论坛里的几条更新数据my.ini我看了,没有问题
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货