上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页
  2019年5月9日
摘要: Validator::make($request->all(),[ 'uname'=>'required', 'sex' =>'required', 'score'=>'required' ])->validate(); 阅读全文
posted @ 2019-05-09 16:40 车车大人 阅读(825) 评论(0) 推荐(0)
  2019年4月11日
摘要: php.ini 配置php.ini文件 (以上传500M以下大小的文件为例) 查找以下选项并修改-> file_uploads = On ;打开文件上传选项 upload_max_filesize = 500M ;上传文件上限 如果要上传比较大的文件,仅仅以上两条还不够,必须把服务器缓存上限调大,把 阅读全文
posted @ 2019-04-11 09:39 车车大人 阅读(216) 评论(0) 推荐(0)
  2019年4月7日
摘要: 使用joinWith进行表关联我们都知道可以用join on来写多个表之间的关联。先看看yii2中joinWit的声明 joinWith( with,with,eagerLoading = true, $joinType = ‘LEFT JOIN’ ) 我们都知道可以用join on来写多个表之间的 阅读全文
posted @ 2019-04-07 10:47 车车大人 阅读(398) 评论(0) 推荐(0)
  2019年3月26日
摘要: 1、找到相应模块的config文件夹的main-local.php文件注释相关代码,如下: 2、将web下面的两个入口文件改成false index.php index-test.php 阅读全文
posted @ 2019-03-26 15:30 车车大人 阅读(2313) 评论(0) 推荐(0)
  2019年3月21日
摘要: 首先判断日志文件存放的文件夹是否存在, is_dir()函数判断文件夹是否存在。 如果没有则需要创建文件夹, mkdir()函数创建文件夹。 $str = "你需要写入日志文件的东西"; \r\n 换行$file = fopen("./log/123.log", "a+"); //创建文件或打开文件 阅读全文
posted @ 2019-03-21 09:56 车车大人 阅读(450) 评论(0) 推荐(0)
  2019年3月18日
摘要: .wxss内容 .wxml内容 .js内容: 最终效果图 阅读全文
posted @ 2019-03-18 17:00 车车大人 阅读(2881) 评论(0) 推荐(0)
  2019年3月13日
摘要: //修改 public function actionUpdateNews(){ //接收前端json数据 $data = file_get_contents('php://input'); //解析json转成数组 $last_data = json_decode($data,true); //取值 ... 阅读全文
posted @ 2019-03-13 14:39 车车大人 阅读(959) 评论(0) 推荐(0)
  2019年1月18日
摘要: \Yii::$app->session->setFlash('success', '添加成功'); return $this->redirect(['user/lists']); 阅读全文
posted @ 2019-01-18 09:58 车车大人 阅读(365) 评论(0) 推荐(0)
  2019年1月17日
摘要: 原始访问模式为:http://www.month9bk.com/index.php?r=user/lists 那么想要改成全是/的pathinfo模式我们需要进行以下配置: 1、打开config文件夹下的main.php输入以下代码: 此代码的位置为: 2、省略掉index.php,我们需要在入口文 阅读全文
posted @ 2019-01-17 16:07 车车大人 阅读(410) 评论(0) 推荐(0)
  2019年1月16日
摘要: Controller Model: view文件夹下的default.php页面: view文件夹下的index.php页面: view文件夹下的lists.php页面: 数据库: 阅读全文
posted @ 2019-01-16 10:07 车车大人 阅读(458) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页