当前位置:网站首页>thinkphp3.2.3
thinkphp3.2.3
2022-07-05 17:11:00 【qq_ forty-two million three hundred and seven thousand five hun】
https://www.thinkphp.cn/donate/download/id/610.html
After installation, the direct access will be in Application Generate home The directory contains the controllers and methods of the front desk. Let's talk about it here thinkphp Adopted mvc framework
m(model) Interacting with the database
v(view) View ,web Displayed page
c The controller is mainly some method functions
thinkphp mvc Use
Visit the home page 
In fact, it accesses /index.php?m=home&c=index&a=index
index.php Is the entry file. All methods need it for transmission m=home&c=index&a=index representative home In the catalog index Controller index Method 
You can also visit
index.php/home/index/index
We can try in index Write a under the controller test Method
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
$this->show('<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: " Microsoft YaHei "; color: #333;font-size:24px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px } a,a:hover{color:blue;}</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> Welcome to use <b>ThinkPHP</b>!</p><br/> edition V{$Think.version}</div><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_55e75dfae343f5a1"></thinkad><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script>','utf-8');
}
public function test(){
echo "This is test";
}
}
Visit Lu Jin
index.php/home/index/index/test
Try to home Create a new controller named test, The method inside is called index Print phpinfo Information 
<?php
namespace Home\Controller;
use Think\Controller;
class TestController extends Controller {
public function index(){
phpinfo();
}
}
visit index.php/home/test/index
边栏推荐
- Little knowledge about C language (array and string)
- Application of threshold homomorphic encryption in privacy Computing: Interpretation
- 【7.7直播预告】《SaaS云原生应用典型架构》大咖讲师教你轻松构建云原生SaaS化应用,难题一一击破,更有华为周边好礼等你领!
- [Jianzhi offer] 66 Build product array
- 【机器人坐标系第一讲】
- Embedded -arm (bare board development) -1
- 一个满分的项目文档是如何书写的|得物技术
- CMake教程Step5(添加系统自检)
- 深耕5G,芯讯通持续推动5G应用百花齐放
- 【jmeter】jmeter脚本高级写法:接口自动化脚本内全部为变量,参数(参数可jenkins配置),函数等实现完整业务流测试
猜你喜欢

【性能测试】jmeter+Grafana+influxdb部署实战

【剑指 Offer】63. 股票的最大利润

The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%

采用药丸屏的iPhone14或引发中国消费者的热烈抢购

Cs231n notes (bottom) - applicable to 0 Foundation

Deeply cultivate 5g, and smart core continues to promote 5g applications

Jarvis OJ shell traffic analysis

阈值同态加密在隐私计算中的应用:解读

First day of learning C language
![[729. My schedule I]](/img/e3/32914227d00cf7595ee850e60f2b72.png)
[729. My schedule I]
随机推荐
叩富网开期货账户安全可靠吗?怎么分辨平台是否安全?
Embedded UC (UNIX System Advanced Programming) -3
stirring! 2022 open atom global open source summit registration is hot!
腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
Judge whether a number is a prime number (prime number)
激动人心!2022开放原子全球开源峰会报名火热开启!
Embedded-c Language-2
Embedded-c Language-5
【jmeter】jmeter脚本高级写法:接口自动化脚本内全部为变量,参数(参数可jenkins配置),函数等实现完整业务流测试
Error in composer installation: no composer lock file present.
国内首家 EMQ 加入亚马逊云科技「初创加速-全球合作伙伴网络计划」
Three traversal methods of binary tree
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Rider 设置选中单词侧边高亮,去除警告建议高亮
【testlink】TestLink1.9.18常见问题解决方法
Embedded -arm (bare board development) -2
goto Statement
Embedded -arm (bare board development) -1
flask解决CORS ERR 问题
网上办理期货开户安全吗?网上会不会骗子比较多?感觉不太靠谱?