PHP Zend framework 配置与调试(二)

一、Scripts中index.html内容:

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>显示数据</title>
</head>
<body>
<a href="<?php echo $this->baseUrl ?>/index/add/">增加数据</a>

<table width="800px" border="1">
<thead>
<tr><th class="title" colspan="2">数据显示列表</th></tr>
<tr><td>标题(title)</td><td>内容(content)</td></tr>
</thead>
<tbody>
<?php foreach($this->messages as $message):?>
<tr>
<th><?php   echo $message['title']; ?></th>
<td><?php echo $message['content']; ?></td>
<td width="100px"><a href="<?php echo $this->baseUrl ?>/index/edit/id/<?php echo $message['id']; ?>/">编辑数据</a></td>
<td width="100px"><a href="<?php echo $this->baseUrl ?>/index/del/id/<?php echo $message['id']; ?>/">删除数据</a></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</body>
</html>

 

 

 

二、add.html内容:

 

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>增加数据</title>
</head>
<body>
<form method="post" action="<?php echo $this->baseUrl?>/index/add/">
<b>增加数据</b><br>
标题:<input type="text" name="title" value="" size="20"><br/>
内容:<textarea  name="content" id="content" col="40"></textarea><br/>
<input type="submit" value="增加数据"/>


</form>
</body>
</html>

 

 

三、edit.html内容:

 

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改数据</title>
</head>
<body>
<a href="<?php echo $this->baseUrl ?>/index/add/">增加数据</a><br/>
<a href="<?php echo $this->baseUrl ?>/index/index/">显示数据</a><br/>
<hr>

<form method="post" action="<?php echo $this->baseUrl?>/index/edit/">
<?php foreach($this->messages as $message):?>

标题:<input type="text" name="title" value="<?php echo $message['title']; ?>" size="20"><br/><br/>
内容:<textarea  name="content" id="content"   col="40"><?php echo $message['content'] ?></textarea><br/>
<input type="hidden" name="id" value="<?php echo $message['id']; ?>" /><br/>
<input type="submit" value="修改数据"/>
<?php endforeach; ?>

</form>

 


</body>
</html>

 

 

四、del.html内容:

 

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>删除数据</title>
</head>
<body>
<a href="<?php echo $this->baseUrl ?>/index/add/">增加数据</a><br/>
<a href="<?php echo $this->baseUrl ?>/index/index/">显示数据</a><br/>
<hr>

<form method="post" action="<?php echo $this->baseUrl?>/index/edit/">
<?php foreach($this->messages as $message):?>

<b>标题:</b><?php echo $message['title']; ?><br/>
<b>内容:</b><?php echo $message['content'] ?><br/>
<input type="hidden" name="id" value="<?php echo $message['id']; ?>" /><br/>
<input type="submit" value="确认删除数据"/>
<?php endforeach; ?>

</form>

 


</body>
</html>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值