当前位置:网站首页>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
边栏推荐
- Error in composer installation: no composer lock file present.
- WSL2.0安装
- Zhang Ping'an: accélérer l'innovation numérique dans le cloud et construire conjointement un écosystème industriel intelligent
- 高数 | 旋转体体积计算方法汇总、二重积分计算旋转体体积
- 【性能测试】jmeter+Grafana+influxdb部署实战
- Etcd build a highly available etcd cluster
- 張平安:加快雲上數字創新,共建產業智慧生態
- 国产芯片产业链两条路齐头并进,ASML真慌了而大举加大合作力度
- Little knowledge about C language (array and string)
- 兰空图床苹果快捷指令
猜你喜欢
随机推荐
PHP talent recruitment system development source code recruitment website source code secondary development
[first lecture on robot coordinate system]
一个满分的项目文档是如何书写的|得物技术
Cs231n notes (bottom) - applicable to 0 Foundation
Jarvis OJ simple network management protocol
Copy mode DMA
DenseNet
项目引入jar从私服Nexus 拉去遇到的一个问题
Excuse me, is the redis syntax used in DMS based on the commands of the redis community version of the cloud database
麻烦问下,DMS中使用Redis语法是以云数据库Redis社区版的命令为参考的嘛
Is it safe to open futures accounts online? Will there be more liars online? Doesn't feel very reliable?
启牛商学院股票开户安全吗?靠谱吗?
EasyX second lesson
張平安:加快雲上數字創新,共建產業智慧生態
Games101 notes (III)
腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
Application of threshold homomorphic encryption in privacy Computing: Interpretation
How does the outer disk futures platform distinguish formal security?
域名解析,反向域名解析nbtstat
Embedded-c language-6