麻烦将下列php代码转换成jsp的,谢谢、
<divclass="main-content"><?$Sql="SELECTd.demotitle,d.democontent,DATE_FORMAT(d.demoti...
<div class="main-content">
<?
$Sql = "SELECT d.demotitle, d.democontent, DATE_FORMAT(d.demotime,'%Y-%m-%d'), d.demopic FROM demos d";
$result = mysql_query($Sql);
while ($row=mysql_fetch_array($result)) {
$_dTitle = $row[0];
$_dContent = $row[1];
$_demotime = $row[2];
$_Pic = $row[3];
?>
<?
echo "→ <a href=\"".$_Pic."?height=480&width=600\" title=\"".$_dTitle."\" class=\"thickbox\">".$_dTitle."</a>";
?>
<hr />
<?=$_dContent?>
<br />
<br />
<?
}
mysql_free_result($result);
mysql_close();
?>
</div> 展开
<?
$Sql = "SELECT d.demotitle, d.democontent, DATE_FORMAT(d.demotime,'%Y-%m-%d'), d.demopic FROM demos d";
$result = mysql_query($Sql);
while ($row=mysql_fetch_array($result)) {
$_dTitle = $row[0];
$_dContent = $row[1];
$_demotime = $row[2];
$_Pic = $row[3];
?>
<?
echo "→ <a href=\"".$_Pic."?height=480&width=600\" title=\"".$_dTitle."\" class=\"thickbox\">".$_dTitle."</a>";
?>
<hr />
<?=$_dContent?>
<br />
<br />
<?
}
mysql_free_result($result);
mysql_close();
?>
</div> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询