当前位置:网站首页>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
边栏推荐
- Jarvis OJ shell traffic analysis
- 阈值同态加密在隐私计算中的应用:解读
- DenseNet
- 网上办理期货开户安全吗?网上会不会骗子比较多?感觉不太靠谱?
- China Radio and television officially launched 5g services, and China Mobile quickly launched free services to retain users
- Games101 notes (III)
- Etcd 构建高可用Etcd集群
- Read the basic grammar of C language in one article
- Embedded UC (UNIX System Advanced Programming) -2
- Zhang Ping'an: accélérer l'innovation numérique dans le cloud et construire conjointement un écosystème industriel intelligent
猜你喜欢
Practical example of propeller easydl: automatic scratch recognition of industrial parts
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
Embedded UC (UNIX System Advanced Programming) -3
WSL2.0安装
stirring! 2022 open atom global open source summit registration is hot!
[Web attack and Defense] WAF detection technology map
ECU introduction
Jarvis OJ Telnet Protocol
一个满分的项目文档是如何书写的|得物技术
深潜Kotlin协程(二十一):Flow 生命周期函数
随机推荐
Excuse me, is the redis syntax used in DMS based on the commands of the redis community version of the cloud database
C language to get program running time
High number | summary of calculation methods of volume of rotating body, double integral calculation of volume of rotating body
什么是ROM
How can C TCP set heartbeat packets to be elegant?
ternary operator
阈值同态加密在隐私计算中的应用:解读
【二叉树】根到叶路径上的不足节点
[729. My Schedule i]
IDC报告:腾讯云数据库稳居关系型数据库市场TOP 2!
Read the basic grammar of C language in one article
URP下Alpha从Gamma空间到Linner空间转换(二)——多Alpha贴图叠加
Etcd 构建高可用Etcd集群
Is it safe for qiniu business school to open a stock account? Is it reliable?
How does the outer disk futures platform distinguish formal security?
微信公众号网页授权登录实现起来如此简单
[7.7 live broadcast preview] the lecturer of "typical architecture of SaaS cloud native applications" teaches you to easily build cloud native SaaS applications. Once the problem is solved, Huawei's s
【729. 我的日程安排表 I】
Is it safe to open futures accounts online? Will there be more liars online? Doesn't feel very reliable?
【Web攻防】WAF检测技术图谱