內(nèi)容管理demo之View-CI(codeigniter)PHP框架
來(lái)源:易賢網(wǎng) 閱讀:1359 次 日期:2014-09-10 10:35:11
溫馨提示:易賢網(wǎng)小編為您整理了“內(nèi)容管理demo之View-CI(codeigniter)PHP框架”,方便廣大網(wǎng)友查閱!

這里是視圖部分,在views里面創(chuàng)建了一個(gè)news文件夾,并有如下文件。

index.html

add.html

change.html

代碼分別是

index.html

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>新聞列表頁(yè)面</title>

</head>

<body>

<table width="408" border="1">

<tr>

<td colspan="3">新聞列表</td>

</tr>

<tr>

<td width="59">序號(hào)</td>

<td width="243">標(biāo)題</td>

<td width="84">操作</td>

</tr>

<?php

foreach($news['list'] as $rows){?>

<tr>

<td width="59"><?php echo $rows['id'];?></td>

<td width="243"><?php echo $rows['title'];?></td>

<td width="84"><a href="../change/<?php echo $rows['id'];?>">修改</a><a href="../del/<?php echo $rows['id'];?>">刪除</a></td>

</tr>

<?php }

?>

<tr>

<td colspan="3">

<a href="1">首頁(yè)</a>

<a href="<?php echo $news['pageup'];?>">上頁(yè)</a>

<a href="<?php echo $news['pagedown'];?>">下頁(yè)</a>

<a href="<?php echo $news['pagemax'];?>">末頁(yè)</a>

</td>

</tr>

</table>

</body>

</html>

add.html 代碼 是

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>添加新聞內(nèi)容</title>

</head>

<body>

<form action="addaction" method="post">

<table width="573" border="1">

<tr>

<td colspan="2" align="center">添加內(nèi)容</td>

</tr>

<tr>

<td width="92">標(biāo)題</td>

<td width="465"><input type="text" name="title" /></td>

</tr>

<tr>

<td height="137">內(nèi)容</td>

<td><textarea name="content" rows="10" cols="50"></textarea></td>

</tr>

<tr>

<td colspan="2">

<input type="submit" value="確定添加" />

</td>

</tr>

</table>

</form>

</body>

</html>

change.html代碼是

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>修改新聞內(nèi)容</title>

</head>

<body>

<form action="../changeaction/<?php echo $id;?>" method="post">

<table width="573" border="1">

<tr>

<td colspan="2" align="center">修改內(nèi)容</td>

</tr>

<tr>

<td width="92">標(biāo)題</td>

<td width="465"><input type="text" value="<?php echo $title;?>" name="title" /></td>

</tr>

<tr>

<td height="137">內(nèi)容</td>

<td><textarea name="content" rows="10" cols="50"><?php echo $content;?></textarea></td>

</tr>

<tr>

<td colspan="2">

<input type="submit" value="確定修改" />

</td>

</tr>

</table>

</form>

</body>

</html>

更多信息請(qǐng)查看IT技術(shù)專欄

更多信息請(qǐng)查看網(wǎng)絡(luò)編程
易賢網(wǎng)手機(jī)網(wǎng)站地址:內(nèi)容管理demo之View-CI(codeigniter)PHP框架
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國(guó)考·省考課程試聽(tīng)報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢 | 簡(jiǎn)要咨詢須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)