-
[综合] 07thinkphp 第十三天 购物车1
<?phpnamespaceapp\home\controller;usethink\Controller; usethink\Db; usethink\Request;classGoodsextendsBase {publicfunctionlst(Request$request,int$c...
94
热度 -
[综合] 07thinkphp 第14天 一对一关联教程 , 关联查询join
publicfunctionone_one(){//$user=User::find(1);//SELECT*FROM`it_user`WHERE`id`=1LIMIT1//$user=User::where('id',1)->select();//SELECT*FROM`it_user`WH...
52
热度 -
[综合] php 闭包函数 传值外部使用use
使用use传递$tel参数 不过我测试global失败,不知道怎么搞得 use正常 $tel='15923456789';/*闭包传值必须使用use($tel)*/$user=User::hasWhere('userInfo',function($query)use($tel){$query->...
86
热度 -
[综合] 07thinkphp 关联添加,关联更新
publicfunctionadd(){//构建user对象$user=newUser;$user->name='xiaoqiang';$user->password='123456';$user->country_id=1;//构建user_info对象$user_info=ne...
111
热度 -
[综合] linux安装mysql 查看密码
查看密码:grep"root@localhost"/var/log/mysqld.log [root@localhostflyer]#grep"root@localhost"/var/log/mysqld.log 2020-01-15T17:36:06.655549Z1[Note]Atemporar...
94
热度 -
[综合] git log 教程
查看版本 $gitlogtest.txt commitffe1abd0d4318b5b92fcbf010001422630615c74(HEAD->master) Author:aimer<15267840622@163.com> Date:ThuMar517:38:592020+...
97
热度 -
[综合] git branch 分支系统
查看分支 $gitbranch *master 新建分支 $gitbranchdev $gitbranchdev*master 切换分支 $gitcheckoutdev Switchedtobranch'dev' 删除分支 $gitbranch-dalibug Deletedbranch...
100
热度 -
[综合] git 远程仓库地址
绑定远程仓库 gitremoteadd别名仓库地址 $gitremoteaddorigin仓库地址 提交 $gitpushoriginmasterEnumeratingobjects:14,done.Countingobjects:100%(14/14),done.Deltacompressi...
14
热度 -
[综合] php 遍历文章下所有文件
<?php /***@param$dirname打印所有文件名称遍历所有文件*/functionreadAll($dirname){if(!is_dir($dirname)){returnfalse;}$handle=opendir($dirname);if($handle){#判断是否是文件...
93
热度 -
[综合] php laravel 第一天 安装laravel
安装命令 composercreate-project--prefer-distlaravel/laravel=5.6.*weblaravel
26
热度 -
[综合] laravel 路由分组 - artisan命令
//路由分组织路由前缀 Route::group(['prefix'=>'admin'],function($route){$route::get('login',function(){return11;});Route::get('logout',function(){return22;})...
88
热度 -
[综合] laveral artisan 命令
启动服务>>phpartisanserver--prot端口号 查看路由分组>>phpartisanroute:list 创建控制器>>phpartisanmake:controller控制器名Controller 资源控制器>>phpartisanm...
59
热度 -
[综合] laravel 路由控制器 分组
#前台登录如果类在我们controllers根目录下面,就不用了加命名空间 Route::get('login','LoginController@index')->name('login');#zaicontrollers下面有目录中的控制器类,则定义的路由一定要加命名空间 Route::g...
47
热度 -
[综合] laravel view
publicfunctionindex(){/*//一定要写模板的名称/resources/views/index.blade.php//returnview('index');//视图分模块#returnview('html/index');//returnview('index.html.ind...
90
热度 -
[综合] laravel view if
@if($data['age']<=10)<h4>儿童</h4>@elseif($data['age']<=20)<h4>少年</h4>@elseif($data['age']<=40)<h4>挣工资</h4>...
29
热度 -
[综合] nodejs fs文件的修改 加写入
varfs=require('fs'); fs.readFile('./hzw.json','utf8',function(err,data){//字符串转数组vararr=JSON.parse(data);for(leti=0;i<arr.length;i++){if(arr[i].id==...
112
热度 -
93
热度 -
[综合] laravel foreach循环
<p>@foreach($listas$k=>$v)<li>{ {$v['title']}}</li>@endforeach</p><p>@forelse($ldaas$k=>$v)<li>{ {$v['t']}}&...
78
热度 -
[综合] laravel 观察者 第五天
<?phpnamespaceApp\Observers;useApp\Models\Permission;classPermissionObserver {//观察者publicfunctioncreating(Permission$permission){$permission->is...
102
热度 -
[综合] swoole 入门 TCP 连接
<?php $server=newswoole_server('0.0.0.0',2544);$server->on('connect',function($ser,$fd){//var_dump($ser);var_dump($fd);echo'建立连接'; }); $server-&...
74
热度