摘要: //////////////////////////////博客系统路由Route::group(['prefix'=>'admin'],function (){ //展示表单添加页面Route::resource('img','imgController');//添加 Route::resourc 阅读全文
posted @ 2021-07-08 09:42 王越666 阅读(44) 评论(0) 推荐(0) 编辑
摘要: public function index(Request $request) { $status = $request->input('status');//接受input里的name值 $title = $request->input('title'); $cate_id = $request- 阅读全文
posted @ 2021-07-07 18:07 王越666 阅读(53) 评论(0) 推荐(0) 编辑
摘要: <?php$a=time();//获取当前的时间戳、echo $a;$b=date('Y-m-d H:i:s');echo $b;//获取当前时间$c=strtotime('2010-02-09');echo $c;//将当前日期转化为时间戳echo "<br>";echo date('Y-m-d 阅读全文
posted @ 2021-07-06 19:18 王越666 阅读(32) 评论(0) 推荐(0) 编辑
摘要: //冒泡排序$arr = [1,4,2,67,22,9,16];function maopao($arr){ $len = count($arr);//外部定义轮数 for ($i = 0; $i < $len - 1; $i++) { for ($j = 0; $j < $len - 1 - $i 阅读全文
posted @ 2021-07-03 15:31 王越666 阅读(85) 评论(0) 推荐(0) 编辑
摘要: <!doctype html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, m 阅读全文
posted @ 2021-07-02 15:48 王越666 阅读(131) 评论(0) 推荐(0) 编辑
摘要: //路由页面 //进入表单页面Route::get('/xin/add','xinController@add');//数据根据post请求发送至添加控制器Route::post('/xin/insert','xinController@insert');//数据展示页面Route::get('/x 阅读全文
posted @ 2021-07-01 11:16 王越666 阅读(63) 评论(0) 推荐(0) 编辑
摘要: public function insert(Request $request){ $parm = $request->except('token'); $this->validate($request, [ 'name' => 'required', 'price' => 'required',' 阅读全文
posted @ 2021-06-29 21:17 王越666 阅读(78) 评论(0) 推荐(0) 编辑
摘要: // 设置路由//展示表单页面Route::get('/week/add','weekController@add');//添加Route::post('/week/insert','weekController@insert');//展示页面Route::get('/week/index','we 阅读全文
posted @ 2021-06-28 13:58 王越666 阅读(126) 评论(0) 推荐(0) 编辑
摘要: class rand{ public function and($length){ $sre=''; $str='zcvbm234298'; for ($i=0;$i<$length;$i++){ $sre.=$str[rand(0,strlen($str)-1)]; } return $sre; 阅读全文
posted @ 2021-06-27 19:35 王越666 阅读(207) 评论(0) 推荐(0) 编辑
摘要: //注意要先引入含有封装类的文件文件:如下: <?phpclass Db{ public $host='127.0.0.1'; public $user='root'; public $pass='root'; public $name='day4'; public $link; function 阅读全文
posted @ 2021-06-19 15:43 王越666 阅读(73) 评论(0) 推荐(0) 编辑