modified: application/index/controller/Index.php new file: application/index/controller/News.php modified: application/route.phpmaster
parent
b50ae14b13
commit
109dd6d5ca
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Wind
|
||||
* Date: 2017/10/27
|
||||
* Time: 9:25
|
||||
*/
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\common\controller\Base;
|
||||
use think\Url;
|
||||
|
||||
class News extends Base
|
||||
{
|
||||
public function read($id)
|
||||
{
|
||||
$html = "
|
||||
<form action= '" . Url::build('/new/5', null, $this->request->ext(), false) . "' method='post'>
|
||||
<input type='text' name='name'>
|
||||
<input type='text' name='pwd'>
|
||||
<input type='submit'>
|
||||
</form>
|
||||
";
|
||||
echo $html;
|
||||
$arr = $this->request->param();
|
||||
var_dump($id);
|
||||
var_dump($arr);
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
var_dump($_REQUEST);
|
||||
die;
|
||||
} else {
|
||||
echo '无效的请求';
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue