cmd 命令提示符(自动生成文件)php
cd ../ 进入D/phpstudy/www/tp5中 从tp5中复制build文件而后 把build文件放入应用目录(application)中 而后再cmd中php think build进行配置。、app
配置获取composer
use think\acade\Config;或者use Config; 获取某个配置的值echo config('app.app_name'); 后面不带参数是原样输出fetch
echo config('app.app_name','ymt');后面带参数是设置ui
读取全部的配置参数:dump((config));this
跨模板渲染 return $this->fetch('admin@member/edit');code
模板赋值:ip
$this->assign('');//赋值
$this->view('');//赋值
$this->fetch('');//赋值cmd
视图渲染string
return $this->fetch();
return view();
若是须要全局替换的话,能够直接在template.php
配置文件中添加:
'tpl_replace_string' =>[
'__STATTC__'=>/static',
'__JS__'=>'/static/jacascript',
]
验证码:cd ../../返回到c盘中,d:进入到d盘中 ,而后cd 在进入phpstudy中 cd进入www 在cd进入项目中 composer require topthink/think-captcha运行