iis服务器助手广告
返回顶部
  • 198
分享到

tp6教程

phpapache服务器 2023-09-06 18:09:16 198人浏览 薄情痞子
摘要

tp6 安装 下载:composer create-project topthink/think tp 安装多应用:composer require topthink/think-multi-app

tp6

安装

下载:composer create-project topthink/think tp

安装多应用:composer require topthink/think-multi-app

修改目录(完成)

├─app 应用目录│  ├─index              主应用│  │  ├─controller      控制器目录│  │  ├─model           模型目录│  │  ├─view            视图目录│  │  ├─config          配置目录│  │  ├─route           路由目录│  │  └─ ...            更多类库目录│  │ │  ├─admin              后台应用│  │  ├─controller      控制器目录│  │  ├─model           模型目录│  │  ├─view            视图目录│  │  ├─config          配置目录│  │  ├─route           路由目录│  │  └─ ...            更多类库目录│├─public                WEB目录(对外访问目录)│  ├─admin.PHP          后台入口文件│  ├─index.php          入口文件│  ├─router.php         快速测试文件│  └─.htaccess          用于apache的重写│├─config                全局应用配置目录├─runtime               运行时目录│  ├─index              index应用运行时目录│  └─admin              admin应用运行时目录

Http,get,post设置头

‘Content-Type’: ‘application/JSON

‘Content-Type’: ‘application/x-www-fORM-urlencoded’

命令

查看命令:php think

创建控制器php think make:controller admin\controller\Userphp think make:controller index\controller\User创建模型make:modelphp think make:model admin\model\Userphp think make:model index\model\User创建中间件make:middlewarephp think make:middleware admin\middleware\Httpphp think make:middleware index\middleware\Oauth2
如果使用了多应用模式,可以快速生成一个应用,例如生成demo应用的指令如下:php think build demo

跨域

Route::group( function () {    Route::get('user', 'user/index');    Route::post('useradd', 'user/useradd');    Route::delete('userdel', 'user/userdel');})->allowCrossDomain([    'Access-Control-Allow-Origin'        => 'http://localhost:8080',    'Access-Control-Allow-Headers'       =>'Origin, Content-Type, Cookie, X-CSRF-TOKEN, Accept, Authorization, X-XSRF-TOKEN',    'Access-Control-Allow-Methods'       =>'GET, POST, PUT, DELETE',    'Access-Control-Allow-Credentials'   => 'true']);

安装视图

composer require topthink/think-view

输出html

return View::fetch('index', [    'name'  => 'ThinkPHP',    'email' => 'thinkphp@qq.com']);

html输出

{$name}

数据库Db

使用需要引入use think\facade\Db;

不需要写表前缀

$list = Db::name('user')->where('id', 1)->find();

必须写表前缀

$list = Db::table('dade_user')->where('id', 1)->find();
插入,添加Db::execute("insert into dade_order_goods(name,price,state,stock,items,richtext,dade) values ($name,$price,$state,$stock,$items,$richtext,$date)");分页$pageSize = (1-1)*10;$list = Db::query("select * from dade_order_goods limit $pageSize,10");根据id倒序order by id desc分页$pageSize = (1-1)*10;$list = Db::query("select * from dade_order_goods order by id desc limit $pageSize,10");加条件select * from dade_user_withdrawal where (state=2) order by id desc limit $pageSize,7查总数count(*)$count = Db::query("select count(id) from dade_order_goods");//总数数组$length = ceil($count[0]['count(id)']/10);//总页数删除Db::execute("delete from dade_order_goods where id=$id");修改 Db::execute("update dade_order_goods set name=$name,price=$price where id=$id");  一次写入100条 Db::table('cdj_pindex_house') ->limit(100) ->insertAll($info);

模型

创建模型

php think make:model admin\model\User

//定义idprotected $pk = 'uid';//数据库表protected $name = 'user';//数据库表这个需要写表前缀protected $table = 'think_user';引入use app\admin\model\User as Users;查询$list = User::where('status', 1)->limit(3)->order('id desc')->select();查两列$user = User::column('id,user');添加$user = User::create([    'name'  =>  'thinkphp',    'email' =>  'thinkphp@qq.com']);批量添加$user = User::create([    'name'  =>  'thinkphp',    'email' =>  'thinkphp@qq.com'], ['name', 'email']);更新User::where('id', 1)->update(['name' => 'thinkphp']);删除User::destroy(1);支持批量删除多个数据User::destroy([1,2,3]);

倒序查询

Users::order('id desc')->select();

查询多少条分页

$ids = $request->get('ids');$list = Users::page($ids,10)->order('id desc')->select();$page  = Users::count();$length = ceil($page/10);$listpage = [$list,$page,$length];return json($listpage);//统计查询出多少条$page = Users::where('user', 'like', '%'.$search .'%')->select()->count();

模型关系查询一对多,一对一

正向

一对多public function orsers(){    return $this->hasMany(Order::class,'store_id');}一对一public function stores(){    return $this->hasOne(Store::class, 'store_id');}

反向

public function stores(){    return $this->belongsTo(Store::class,'store_id');}//查询$idsv = 1;$list = Users::with('stores')->page($idsv,10)->order('id desc')->select();

合并在一个数组里查询

$list = Orders::withJoin(['stores'  => ['id', 'user']])->page($idsv,10)->order('id desc')->select();

模型创建修改时间戳转换

protected $type = [   'tiem2'  =>  'timestamp:Y/m/d H:i:s',];protected $createTime = 'tiem';protected $updateTime = 'tiem1';protected $dateFormat = "Y-m-d H:i:s";

PHP写入文件excel

第一种file_put_contents("excel/tests.xlsx", $shuj, FILE_APPEND);
第二种(写入一次w,追加写入a)$file = fopen("excel/test1.xlsx","a");fwrite($file,"数据");fclose($file);

php获得当前时间

$userlevel['time'] = date('Y-m-d H:i:s');$userlevel['time'] = time();第二种写法$t=time();date("Y-m-d H:i:s",$t);日期转时间戳strtotime(date("Y-m-d H:i"));//获得7天前时间$stime = mktime(0,0,0,date('m'),date('d')-7,date('Y'))-1;$time = date("Ymd",$stime);

接收iview上传图片

$file = $request->file('file');$savename = \think\facade\Filesystem::disk('public')->putFile( 'topic', $file);echo $savename;

php生成随机数

$code = rand(10000, 99999);

保存数组解码数组

// 写入数据库之前$staff_serialize = serialize($staff);            // 序列化成字符串$staff_json = json_encode($staff);               // JSON编码数组成字符串// 读取数据库后$staff_restore = unserialize($staff_serialize);  // 反序列化成数组$staff_dejson = json_decode($staff_json, true);  // JSON解码成数组

数组追加

$list = [$Goodsid,$result];$items = unserialize($order[0]['item']);$itemss = array_merge($items,$list);结果[3, "可以是的11111", 3, "可以是的11111", 3, "可以是的11111", 5, "可以是的1111111"]0: 31: "可以是的11111"2: 33: "可以是的11111"4: 35: "可以是的11111"6: 57: "可以是的1111111"

理想二维追加

$list = [[$goodsid,$result]];$items = unserialize($order[0]['item']);$itemss = array_merge_recursive($items,$list);结果[[5, "可以是的1111111"], [5, "可以是的1111111"], [2, "可以是的"], [2, "可以是的"], [2, "可以是的"], [2, "可以是的"]]0: [5, "可以是的1111111"]1: [5, "可以是的1111111"]2: [2, "可以是的"]3: [2, "可以是的"]4: [2, "可以是的"]5: [2, "可以是的"]

获得url

$_SERVER[‘HTTP_HOST’]

php跳转

header("Location:".$url);

微信授权获得网站输出

$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appid&secret=$secret&code=$code&grant_type=authorization_code";$weix = file_get_contents($url);//获得网页输出

Redis缓存,缓存

use think\facade\Cache;//引入$security = $user."_security";Cache::set($security, $users[0]['jurisdiction'],36000);//缓存权限$securitys = Cache::get($security);//查

php拆分成数组

$Plain = “aaa|666|777”;

l i s t = e x p l o d e (′ ∣′ , list = explode('|', list=explode(,Plain);

微信发送消息推送

public function template($id){    $user = User::where('id',$id)->value('openid');//微信openid    $url = $_SERVER['HTTP_HOST'];    $wxurl = 'https://api.weixin.qq.com/cgi-bin/token/template/send?access_token=ACCESS_TOKEN';    $weixin = Weixin::where('id',1)->select();    $appid = $weixin[0]['appid'];//公众号appid    $secret = $weixin[0]['appsecret'];//公众号appsecret    //获得access_token    $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$secret";    $weix = file_get_contents($url);//获得网页输出    $obj=json_decode($weix,true );//解码    $access_token= $obj['access_token'];//网页授权接口调用凭证    //发送模板消息    $fasuerl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=".$access_token;    $data = array(        "touser"=>$user,        "template_id"=>"2GSNHCC4xOrz9p9fqmKLbUwknwVa1iZnClqzbQb5xhw",        "data" => array(            "first" => array(                "value"=>"咨询通知",                "color"=>"#173177"            ),            "keyword1" => array(                "value"=>"巧克力!",                "color"=>"#000000"            ),            "keyword2" => array(                "value"=>"巧克力!",                "color"=>"#000000"            ),            "remark" => array(                "value"=>"巧克力!",                "color"=>"#000000"            ),        )    );    $params = json_encode($data);    $res=$this->curl_post($fasuerl,$params);    print_r($res);}//发送post请求function curl_post($url , $data=array()){    $ch = curl_init();//创建curl请求    curl_setopt($ch, CURLOPT_URL,$url); //设置发送数据的网址    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //设置有返回值,0,直接显示    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); //禁用证书验证    curl_setopt($ch, CURLOPT_POST, 1);//post方法请求    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);//post请求发送的数据包    $data = curl_exec($ch);    curl_close($ch);    $data = json_decode($data,true); //将json数据转成数组    return $data;}

微信注册

//微信信息,跳转授权public function index(){    $weixin = wx::where('id',1)->select();    $APPID = '';    $url = '';    $scope='snsapi_userinfo';    foreach ($weixin as $item){        $APPID = $item['appid'];        $list[0]['appid'] = $item['appid'];        $list[0]['appsecret'] = $item['appsecret'];        $list[0]['encodingaeskey'] = $item['encodingaeskey'];        $url = $_SERVER['HTTP_HOST'];        $list[0]['url'] = $url."/".$item['url'];        $url = 'http://'.$url."/".$item['url'];        $list[0]['token'] = $item['token'];    }    $url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$APPID."&redirect_uri=".urlencode($url)."&response_type=code&scope=".$scope."&state=STATE#wechat_redirect";    $liste = [$url];    return json($liste);}//获得用户信息,跳转返回可以获得信息public function weixiname(Request $request){    $code = $request->get('code');    $state = $request->get('state');    $weixin = wx::where('id',1)->select();    $appid = $weixin[0]['appid'];    $secret = $weixin[0]['appsecret'];    //获得openid    $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appid&secret=$secret&code=$code&grant_type=authorization_code";    $weix = file_get_contents($url);//获得网页输出    $obj=json_decode($weix,true );//解码    $accesstoken= $obj['access_token'];//网页授权接口调用凭证    $openid = $obj['openid'];//openid    //获得用户信息    $urlname = "https://api.weixin.qq.com/sns/userinfo?access_token=$accesstoken&openid=$openid&lang=zh_CN";    $weixs = file_get_contents($urlname);    $objs=json_decode($weixs,true );//解码    $user['openid'] = $objs['openid'];//openid    $user['user'] = $objs['nickname'];//微信名称    $user['province'] = $objs['province'];//用户个人资料填写的省份    $user['city'] = $objs['city'];//用户个人资料填写的城市    $user['img'] = $objs['headimgurl'];//头像,用户更换头像时,失效    //登陆    if($objs['openid']){        $users = User::where('openid',$objs['openid'])->value('openid');        if(empty($users)){            //第一次            $user['level_id'] = 1;            $user['level'] = "普通会员";            $user['time'] = date('Y-m-d H:i:s');//加入时间            User::create($user);            $list = User::where('openid',$objs['openid'])->select();            $user_id = $list[0]['id'];            $user_user = $list[0]['user'];            $openid = $list[0]['openid'];            $img = $list[0]['img'];            $url = "http://localhost:8080/#/loginwx?user_id=$user_id&user_user=$user_user&openid=$openid&member=1&img=$img";            header("Location:".$url);        }else{            //已存在用户            $list = User::where('openid',$objs['openid'])->select();            //更新图片            if($list[0]['img'] == $objs['headimgurl']){            }else{                $user_img = $objs['headimgurl'];                User::where('openid', $objs['openid'])->update(['img' => $user_img]);            }            $user_id = $list[0]['id'];            $user_user = $list[0]['user'];            $openid = $list[0]['openid'];            $img = $list[0]['img'];            $store = Store::where('user_id',$user_id)->select();            if(empty($store[0]['id'])){                $expert = Expert::where('user_id',$user_id)->select();                if(empty($expert[0]['id'])){                    //用户                    $url = "http://localhost:8080/#/loginwx?user_id=$user_id&user_user=$user_user&openid=$openid&member=1&img=$img";                    header("Location:".$url);                }else{                    //专家                    $expert_id = $expert[0]['id'];                    $region = $expert[0]['region'];//南方。还是北方                    $expert_name = $expert[0]['name'];//专家姓名                    $url = "http://localhost:8080/#/loginwx?user_id=$user_id&user_user=$user_user&openid=$openid&member=3&img=$img&expert_id=$expert_id®ion=$region&expert_name=$expert_name";                    header("Location:".$url);                }            }else{                //加盟店或省代                $store_id = $store[0]['id'];                $store_level = $store[0]['level'];//门店级别,是省代,还是门店                $store_user = $store[0]['user'];//门店名称                $url = "http://localhost:8080/#/loginwx?user_id=$user_id&user_user=$user_user&openid=$openid&member=2&img=$img&store_id=$store_id&store_level=$store_level&store_user=$store_user";                header("Location:".$url);            }        }    }}//判断用户存在不存在,级别是否变动public function weixinpd(Request $request){    $id = $request->get('id');    $jib = $request->get('jib');    if($jib == 1){        $list = User::where('id',$id)->select();        $store = Store::where('user_id',$id)->select();        $expert = Expert::where('user_id',$id)->select();        if(empty($store[0]['id'])){        }else{            return json(1);        }        if(empty($expert[0]['id'])){        }else{            return json(1);        }        if(empty($list[0]['id'])){            return json(1);        }else{            return json(2);        }    }    if($jib == 2){        $store = Store::where('id',$id)->select();        $user_id = $request->get('user_id');        $store_level = $request->get('store_level');        if(empty($store[0]['id'])){            return json(1);        }else{            if($store[0]['level'] != $store_level){                return json(1);            }            if($store[0]['user_id'] == $user_id){                return json(2);            }else{                return json(1);            }        }    }    if($jib == 3){        $user_id = $request->get('user_id');        $expert = Expert::where('id',$id)->select();        if(empty($expert[0]['id'])){            return json(1);        }else{            if($expert[0]['user_id'] == $user_id){                return json(2);            }else{                return json(1);            }        }    }}

原生连接数据库Mysql

// 创建连接    $conn = new mysqli($servername, $username, $password,'sql_322_zgh_iotc');    // 检测连接    if ($conn->connect_error) {        die("连接失败: " . $conn->connect_error);    }    $sql = "update `ims_ewei_shop_order` set status=2,mercdttm='{$MercDtTm}',acqssn='{$AcqSsn}',settdate='{$SettDate}' where termtsn='{$TermSsn}'";//    echo $sql;    $res = mysqli_query($conn,$sql);    mysqli_affected_rows($conn);    mysqli_close($conn);

数组降序,升序

$guys = array(    array('name'=>'jake', 'score'=>80, 'grade' =>'A'),    array('name'=>'jina', 'score'=>70, 'grade'=>'A'),    array('name'=>'john', 'score'=>70, 'grade' =>'A'),    array('name'=>'ben', 'score'=>20, 'grade'=>'B'));//例如我们想按成绩倒序排列,如果成绩相同就按名字的升序排列。*//这时我们就需要根据$guys的顺序多弄两个数组出来:*$scores = array(80,70,70,20);$names = array('jake','jina','john','ben');//然后,排序顺序标志 SORT_DESC 降序;SORT_ASC 升序array_multisort($scores, SORT_DESC, $names, $guys);//测试成功$list = 二维数组;$scores = array();$names = array();foreach ($list as $key=>$it){$scores[$key] =  $it['mobile'];$names[$key] = $it['id'];} array_multisort($scores, SORT_DESC, $names, $list);直接输出$list就可以

二维数组转一维数组,转字符串

//$list1是二维数组$array = array_column($list1, 'jurisdiction_id');//转一维$implode = implode(",",$array);//转字符串逗号隔开

文件定一个一个来

$file = 'static/temp.txt';//文件路径$fp = fopen($file,'a');//打开文件//排队一个一个来,设定if(flock($fp,LOCK_EX)){    for($i = 0;$i < 5;$i++)    {        fwrite($fp, "11111111n");        sleep(1);    }    flock($fp,LOCK_UN);//释放设定}fclose($fp);//关闭文件,释放

下载phpexcel操作

tp6安装phpexcel,进入这个项目运行composer require phpoffice/phpexcel读取excel文件内容保存数据库引入use PHPExcel_IOFactory;//$path1路径$objPHPExcel = PHPExcel_IOFactory::load($path1);            $sheet = $objPHPExcel->getSheet(0);            $highestRow = $sheet->getHighestRow(); // 取得总行数            $highestColumn = $sheet->getHighestColumn(); // 取得总列数            $k = 0;            $info = array();            $ids = 0;            for($j=1;$j<=$highestRow;$j++)            {                $a = $objPHPExcel->getActiveSheet()->getCell("A".$j)->getValue();//获取A列的值                $b = $objPHPExcel->getActiveSheet()->getCell("B".$j)->getValue();//获取B列的值                $info[$ids]['a'] = $a;                $info[$ids]['b'] = $b;                $ids++;            }            return json($info);

数组合并array_merge

$sfx = Db::query("select id,name as label from cdj_pindex_house_charge where pindex_id=$id and type=$type and fixed=2");        $sfx1 = Db::query("select company_id from cdj_pindex where id=$id");        $cid = $sfx1[0]['company_id'];        $sfx2 = Db::query("select id,name as label from cdj_pindex_house_charge where company_id=$cid and type=$type and fixed=1");        $sfx = array_merge($sfx,$sfx2);

获得一年12月

$yuef = [];$currentTime = time();$cyear = floor(date("Y",$currentTime));$cMonth = floor(date("1",$currentTime));for($i=0;$i<12;$i++){    $nMonth = $cMonth+$i;    $cyear = $nMonth == 0 ? ($cyear-1) : $cyear;//年    $nMonth = $nMonth <= 0 ? 12+$nMonth : $nMonth;//月    $date = $cyear."-".$nMonth."-1";    $firstday = date('Y-m-01', strtotime($date));//当月第一天    $lastday = date('Y-m-t', strtotime($date));//当月最后阳台    $string = $cyear."年".$nMonth."月".$firstday."日";    $string1 = $cyear."年".$nMonth."月".$lastday."日";    $yuef[]=[$string,$string1];}

域名将反斜杆转为正斜杠

将反斜杆转为正斜杠str_replace("\\",'/',$info->getSaveName()), *//将反斜杆转为正斜杠*

获得域名后面的路由

$url = parse_url($request->baseUrl());

门面

userList['company_id'];//组织        //$listLog['name'] = $request->userList['user'];//登录账号        //$listLog['caozuo'] = "架构";//操作类型        //$listLog['caozuoxiangqin'] = "$baoc"."收费项,名称:".$dates["name"].",id:".$id.$idc;//操作内容        //Facades::log($listLog);}

一维数组合并,号隔开

$userjarr = implode(',',$userJArr);逗号分割$list[0]['pindex_id'] = explode(",",$pindex_id);获得一维数组长度count($length);

url反斜杠转正斜杠

$date['carousel'] = str_replace("\\",'/',$date['carousel']);

视图

 安装 composer require topthink/think-view 使用 public function index() {     View::assign([         'name'  => 'ThinkPHP',         'email' => 'thinkphp@qq.com'     ]);     return View::fetch('index'); }  在view新建 index/index.html  模板使用 新建common/haeder.html 在index中引入 {include file="common/haeder"/}

来源地址:https://blog.csdn.net/qq_34631220/article/details/128171964

--结束END--

本文标题: tp6教程

本文链接: http://www.lsjlt.com/news/397410.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • tp6教程
    tp6 安装 下载:composer create-project topthink/think tp 安装多应用:composer require topthink/think-multi-app ...
    99+
    2023-09-06
    php apache 服务器
  • tp6 伪静态配置
    tp6 伪静态配置 文章目录 tp6 伪静态配置前言一、Apache下的伪静态配置二、Nignx下的伪静态配置总结 前言 本次文章记录tp6下的伪静态配置。 一、Apache下的伪静态...
    99+
    2023-09-01
    apache php 开发语言 nginx
  • tp6框架升级支持php8
    tp6框架升级:使用cmd切换至tp项目后运行以下命令 composer update php升级到8后,tp6框架中生成验证码报错 Implicit conversion from flo...
    99+
    2023-09-03
    php 开发语言
  • tp6微信支付apiv3
    公司要整一个扫码支付然后有个后台能查看交易记录,然后百度搜寻,决定使用laytp2.0框架搭后台。   参考了以下文档: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_1....
    99+
    2023-09-03
    php
  • tp6 隐藏index.php nginx 新手
    路由无法访问的问题,也可以试一下此方法。   点击你的项目的站点,会打开站点的conf文件,添加如下红色部分,或者添加到站点的伪静态里也行(伪静态会不会有影响我不太清楚)。 server {         listen        8...
    99+
    2023-09-05
    nginx php 服务器
  • 【PHP】TP6 queue队列基本使用
    TP6 queue队列基本使用 关于队列的模式 sync 同步执行 2:database 配合数据库完成 3:redis 配合redis完成 小提醒:异步执行 最好使用redis作为配合 直接开始上代...
    99+
    2023-09-10
    php 数据库 thinkphp6 tp6队列
  • tp6实现邮件发送
    tp6实现邮件发送 phpMailer 是一个非常强大的 ph p发送邮件类,可以设定发送邮件地址、回复地址、邮件主题、html网页,上传附件,并且使用起来非常方便。 phpMailer 的特点: 1、在邮件中包含多个 TO、CC、BCC ...
    99+
    2023-09-15
    服务器 php 运维
  • tp6 实现简单登录
    配置路由 //登录页面 Route::get('login','Login/login'); 写html表单页面 Title .main{ width: 500px; ...
    99+
    2023-09-20
    php
  • 写给使用thinkphp 6 的初级使用者 更快更好更优雅的使用 think tp6教程
    安装think 什么是MAC控制器层使用语法创建 控制器我会在项目最后 放入 一个项目所需要的全部 composer 类库模型层 如何更优雅使用thinkphp 61. 控制器 使用:登录...
    99+
    2023-09-02
    php apache 数据库
  • php在线客服:TP6+workerman实现
    启动workman php think worker:server 加上-d 后台运行 tp6安装workerman扩展 composer requirehttps://blog.csdn.net/w...
    99+
    2023-10-07
    php json 开发语言
  • 从零开始TP6配置ThinkPHP-ApiDoc
    系统:windows11 集成环境:小皮(原phpstudy) composer:2.5 准备工作:安装小皮后,在软件管理中安装composer,2.3安装不上去,只能安装1.8.5,没关系安装后升级成为新版就可以,安装后记得把compos...
    99+
    2023-09-07
    php 开发语言 apidoc
  • tp6 php 用chatgpt写的防爬技术
    以上代码中,我们在原有的User-Agent检测和IP限制的基础上,添加了访问频率控制的代码。我们使用APC(Alternative PHP Cache)作为缓存,每个IP地址的访问次数被限制为100次,IP地址被封锁的时间为1小时。如果...
    99+
    2023-09-11
    chatgpt php
  • TP6 使用jwt生成token加密解密
    第一步,需要安装TP6框架,如果没有安装我给你一个composer composer create-project topthink/think tp 第二步,需要安装一个PHP的jwt插件,也使用composer composer req...
    99+
    2023-09-05
    php java 开发语言
  • 前端如何调用后台tp6验证码
    这篇文章主要为大家展示了“前端如何调用后台tp6验证码”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“前端如何调用后台tp6验证码”这篇文章吧。环境前端:uni-app后端:thinkphp6在做...
    99+
    2023-06-22
  • MySQL 教程---菜鸟教程
    文章目录 MySQL 教程登录 MySQL数据库操作数据类型创建数据表删除数据表插入数据查询数据WHERE 子句UPDATE 更新DELETE 子句LIKE 子句UNION 操...
    99+
    2023-09-06
    mysql 数据库
  • TP6中出现No input file specified报错解决办法
    今天在使用tp6框架的时候突然出现的报错,顺手做下记录,防止遗忘或者以后遇到同样的情况可以快速解决. 自己本地的项目昨天还可以正常启动,今天同步代码后,运行报错: No input file specified 根据以前的经验我以为是...
    99+
    2023-09-02
    php Powered by 金山文档
  • phpstudy配置tp6路由出错nginx: [emerg] unknown directive
    当我们把TP6手册的nginx配置代码复制到nginx.htaccess文件中,重启本地nginx的时候,老是显示这个错误,原因:nginx.htaccess文件不能有空格,仔细检查哪里有空格,...
    99+
    2023-09-08
    nginx tp6 tp6路由 php
  • TP6中的原生MySql语句是什么
    这篇文章给大家分享的是有关TP6中的原生MySql语句是什么的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。使用前提:ThinkPHP6 数据库和模型操作已经独立为ThinkORM库要使用Db类必须使用门面方式( ...
    99+
    2023-06-14
  • TP6项目搭建的方法是什么
    这篇文章主要讲解了“TP6项目搭建的方法是什么”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“TP6项目搭建的方法是什么”吧!thinkphp6 项目搭建记录创建项目composer ...
    99+
    2023-06-25
  • tp6多应用路由设置与访问
    多应用安装 composer require topthink/think-multi-app 安装完我们在app目录下创建几个应用目录,分别为admin,api,mobile 创建多应用目录之后我...
    99+
    2023-09-10
    php ThinkPHP tp6
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作