摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>模板继承@yield('title')</title> <style> .header{ width: 1000px; height:150px; margin 阅读全文
posted @ 2016-10-19 17:09 Yxh_blogs 阅读(540) 评论(0) 推荐(0)
摘要: public function query(){ //新增数据 //$bool = DB::table('wd_user')->insert(['username'=>'jack']); //dd($bool); //新增数据并且获取到自增id //$id = DB::table('wd_user' 阅读全文
posted @ 2016-10-19 17:04 Yxh_blogs 阅读(602) 评论(0) 推荐(0)
摘要: public function orm(){ //查询表的所有记录 //$user = Admin::all(); //dd($user); //查询某一条记录 //$user = Admin::find(2); //dd($user); //findOrFail() 根据主键查找,如果没有找到就抛 阅读全文
posted @ 2016-10-19 17:04 Yxh_blogs 阅读(6679) 评论(0) 推荐(0)
摘要: <?phpnamespace App;use Illuminate\Database\Eloquent\Model;class Admin extends Model{ //指定表名 protected $table = 'wd_user'; //指定允许批量复制的字段 protected $fil 阅读全文
posted @ 2016-10-19 17:02 Yxh_blogs 阅读(1299) 评论(0) 推荐(0)
摘要: //路由中输出视图Route::get('/', function () { return view('welcome');});//get路由请求Route::get('get',function(){ return 'get路由请求';});//post路由请求Route::post('post 阅读全文
posted @ 2016-10-19 17:01 Yxh_blogs 阅读(885) 评论(0) 推荐(0)
摘要: //定义一个json var validate = { username : false, pwd : false, pwded : false, verify : false, loginUsername : false, loginPwd :false } //存储错误信息 var $msg = 阅读全文
posted @ 2016-10-08 16:21 Yxh_blogs 阅读(857) 评论(0) 推荐(0)
摘要: 在ThinkPHP3.2.3的版本中,配置项的读取,有两种情况。 是在PHP文件或者在PHP代码中的读取方法为C函数,例如:C('配置项的名称'); 在HTML模板中的读取方法为,例如{$Think.config.WEBNAME} 阅读全文
posted @ 2016-10-08 09:43 Yxh_blogs 阅读(5074) 评论(0) 推荐(0)
摘要: //删除分类 public function del(){ $cid = I('get.cid'); $cate = M('category')->field('cid,pid')->select(); $cate = $this->son_cate($cate,$cid); $cate[] = $ 阅读全文
posted @ 2016-10-07 22:03 Yxh_blogs 阅读(34198) 评论(0) 推荐(1)
摘要: 今天访问PHP网站如下以下错误: Fatal error: Maximum function nesting level of '100' reached, aborting! 原因分析: 这个问题是由于你启用了xdebug,而xdebug默认设置了函数最大嵌套数为100 解决办法: 找到php.i 阅读全文
posted @ 2016-10-07 21:14 Yxh_blogs 阅读(1739) 评论(0) 推荐(0)
摘要: 无限级分类递归排序 阅读全文
posted @ 2016-10-07 20:14 Yxh_blogs 阅读(430) 评论(0) 推荐(0)