<?php } ?> 啥意思
PHP视频教程65当中的一段代码:admin_news_list.php<?phpinclude_once('admin_global.php');$r=$db->Get...
PHP视频教程65当中的一段代码:
admin_news_list.php
<?php
include_once ('admin_global.php');
$r=$db->Get_user_shell_check($uid, $shell);
//新闻分类的名称 数组
$query=$db->findall("p_newsclass");
while ($row=$db->fetch_array($query)) {
$news_class_arr[$row[id]]=$row[name];
}
//删除文章
if(isset($_GET[del])){
mysql_query("DELETE FROM `p_newsbase` WHERE `id` = '$_GET[del]' LIMIT 1;");
mysql_query("DELETE FROM `p_newscontent` WHERE `nid` = '$_GET[del]' LIMIT 1;");
$db->Get_admin_msg("admin_news_list.php","添加成功");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>后台管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=Alan name=Author>
<LINK rev=MADE href="[email=mailto:haowubai@hotmail.com]haowubai@hotmail.com[/email]">
<LINK href="images/private.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<TABLE class=navi cellSpacing=1 align=center border=0>
<TBODY>
<TR>
<TH>后台 >> 新闻管理</TH></TR></TBODY></TABLE><BR>
<table border=0 cellspacing=1 align=center class=form>
<tr>
<th width='100'>新闻分类</th><th>新闻标题</th><th width='100'>作者</th><th width='100'>日期</th><th width='100'>操作</th>
</tr>
<tr>
<?php //分页原理
$result = mysql_query("select id from p_newsbase");
$total = mysql_num_rows($result);
pageft($total, 20);
if ($firstcount < 0) $firstcount = 0;
//查找条数
$query = $db->findall("p_newsbase limit $firstcount, $displaypg");
while ($row = $db->fetch_array($query)) {
?>
<td><?php echo $news_class_arr[$row[cid]]?></td><td><?php echo $row[title]?></td><td><?php echo $row[author]?></td>
<td><?php echo date("Y-m-d H:i",$row[date_time])?></td><td><a href='?del=<?php echo $row[id]?>'>删除</a> / <a href='admin_news_edit.php?id=<?php echo $row[id]?>'>修改</a></td>
</tr>
<?php
}
?>
<tr>
<th colspan="5"><?php echo $pagenav;?></th>
</tr>
</table>
<br>
</BODY></HTML>
其中<?php
}
?>
是什么意思 ,在这里起什么作用,能详细说明么? 展开
admin_news_list.php
<?php
include_once ('admin_global.php');
$r=$db->Get_user_shell_check($uid, $shell);
//新闻分类的名称 数组
$query=$db->findall("p_newsclass");
while ($row=$db->fetch_array($query)) {
$news_class_arr[$row[id]]=$row[name];
}
//删除文章
if(isset($_GET[del])){
mysql_query("DELETE FROM `p_newsbase` WHERE `id` = '$_GET[del]' LIMIT 1;");
mysql_query("DELETE FROM `p_newscontent` WHERE `nid` = '$_GET[del]' LIMIT 1;");
$db->Get_admin_msg("admin_news_list.php","添加成功");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>后台管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=Alan name=Author>
<LINK rev=MADE href="[email=mailto:haowubai@hotmail.com]haowubai@hotmail.com[/email]">
<LINK href="images/private.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<TABLE class=navi cellSpacing=1 align=center border=0>
<TBODY>
<TR>
<TH>后台 >> 新闻管理</TH></TR></TBODY></TABLE><BR>
<table border=0 cellspacing=1 align=center class=form>
<tr>
<th width='100'>新闻分类</th><th>新闻标题</th><th width='100'>作者</th><th width='100'>日期</th><th width='100'>操作</th>
</tr>
<tr>
<?php //分页原理
$result = mysql_query("select id from p_newsbase");
$total = mysql_num_rows($result);
pageft($total, 20);
if ($firstcount < 0) $firstcount = 0;
//查找条数
$query = $db->findall("p_newsbase limit $firstcount, $displaypg");
while ($row = $db->fetch_array($query)) {
?>
<td><?php echo $news_class_arr[$row[cid]]?></td><td><?php echo $row[title]?></td><td><?php echo $row[author]?></td>
<td><?php echo date("Y-m-d H:i",$row[date_time])?></td><td><a href='?del=<?php echo $row[id]?>'>删除</a> / <a href='admin_news_edit.php?id=<?php echo $row[id]?>'>修改</a></td>
</tr>
<?php
}
?>
<tr>
<th colspan="5"><?php echo $pagenav;?></th>
</tr>
</table>
<br>
</BODY></HTML>
其中<?php
}
?>
是什么意思 ,在这里起什么作用,能详细说明么? 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询