当前位置:网站首页>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
边栏推荐
- Using C language to realize palindrome number
- What is ROM
- 麻烦问下,DMS中使用Redis语法是以云数据库Redis社区版的命令为参考的嘛
- CMake教程Step2(添加库)
- 飞桨EasyDL实操范例:工业零件划痕自动识别
- High number | summary of calculation methods of volume of rotating body, double integral calculation of volume of rotating body
- Embedded-c Language-5
- 【剑指 Offer】63. 股票的最大利润
- [729. My schedule I]
- Embedded UC (UNIX System Advanced Programming) -2
猜你喜欢

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

【机器人坐标系第一讲】

Jarvis OJ Telnet Protocol

Jarvis OJ shell traffic analysis

飞桨EasyDL实操范例:工业零件划痕自动识别

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

American chips are no longer proud, and Chinese chips have successfully won the first place in emerging fields

WSL2.0安装

Etcd build a highly available etcd cluster

调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
随机推荐
Deeply cultivate 5g, and smart core continues to promote 5g applications
Is it safe to open a securities account by mobile phone? Detailed steps of how to buy stocks
Jarvis OJ simple network management protocol
Using C language to realize palindrome number
Timestamp strtotime the day before or after the date
Games101 notes (I)
Deep learning plus
项目引入jar从私服Nexus 拉去遇到的一个问题
Games101 notes (II)
How to write a full score project document | acquisition technology
张平安:加快云上数字创新,共建产业智慧生态
CMake教程Step4(安装和测试)
Is it safe to open futures accounts online? Will there be more liars online? Doesn't feel very reliable?
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
PHP人才招聘系统开发 源代码 招聘网站源码二次开发
Little knowledge about C language (array and string)
通过proc接口调试内核代码
Read the basic grammar of C language in one article
【微信小程序】一文读懂小程序的生命周期和路由跳转
美国芯片傲不起来了,中国芯片成功在新兴领域夺得第一名