?\r\n??\r\n?該筆訂單支付金額為1分<\/span>錢(qián)<\/b><\/font>?\r\n?1分<\/span>錢(qián)也是愛(ài)<\/b><\/font>?\r\n??\r\n??果斷買(mǎi)買(mǎi)買(mǎi)^_^<\/button>?\r\n?<\/p>?\r\n<\/body>?\r\n<\/html><\/pre>\n

However, you should pay attention to the URL of the payment page, because the URL of the payment page must have many parameters. Just now Speaking of the REWRITE mode used in TP, your link is similar to [ http:\/\/serverName\/Home\/Blog\/read\/id\/1 ], which may have more parameters. At this time, WeChat Pay will consider your payment The authorization directory is [http:\/\/serverName\/Home\/Blog\/read\/id\/], but your real authorization directory is [http:\/\/serverName\/Home\/Blog\/], so an error will be reported. The solution is to reconstruct the URL when entering the payment page and write it in normal mode, which is [http:\/\/serverName\/Home\/Blog\/read?id=1], and that's it. <\/p>\n

\"\"<\/p>\n

(3)支持成功回調(diào)<\/p>\n

現(xiàn)在支付完成,就會(huì)進(jìn)入到之前寫(xiě)好的鏈接對(duì)應(yīng)的方法,即[? http:\/\/serverName\/payment.php\/WexinApi\/WeixinPay\/notify]:<\/p>\n

\/\/微信支付回調(diào)驗(yàn)證?\r\npublic?function?notify(){?\r\n?$xml?=?$GLOBALS['HTTP_RAW_POST_DATA'];?\r\n?\/\/?這句file_put_contents是用來(lái)查看服務(wù)器返回的XML數(shù)據(jù)?測(cè)試完可以刪除了?\r\n?file_put_contents('.\/Api\/wxpay\/logs\/log.txt',$xml,FILE_APPEND);?\r\n?\/\/將服務(wù)器返回的XML數(shù)據(jù)轉(zhuǎn)化為數(shù)組?\r\n?\/\/$data?=?json_decode(json_encode(simplexml_load_string($xml,'SimpleXMLElement',LIBXML_NOCDATA)),true);?\r\n?$data?=?xmlToArray($xml);?\r\n?\/\/?保存微信服務(wù)器返回的簽名sign?\r\n?$data_sign?=?$data['sign'];?\r\n?\/\/?sign不參與簽名算法?\r\n?unset($data['sign']);?\r\n?$sign?=?$this->makeSign($data);?\r\n?\/\/?判斷簽名是否正確?判斷支付狀態(tài)?\r\n?if?(?($sign===$data_sign)?&&?($data['return_code']=='SUCCESS')?&&?($data['result_code']=='SUCCESS')?)?{?\r\n??$result?=?$data;?\r\n??\/\/?這句file_put_contents是用來(lái)查看服務(wù)器返回的XML數(shù)據(jù)?測(cè)試完可以刪除了?\r\n??file_put_contents('.\/Api\/wxpay\/logs\/log1.txt',$xml,FILE_APPEND);?\r\n??\/\/獲取服務(wù)器返回的數(shù)據(jù)?\r\n??$order_sn?=?$data['out_trade_no'];?\/\/訂單單號(hào)?\r\n??$order_id?=?$data['attach'];??\/\/附加參數(shù),選擇傳遞訂單ID?\r\n??$openid?=?$data['openid'];???\/\/付款人openID?\r\n??$total_fee?=?$data['total_fee'];?\/\/付款金額?\r\n??\/\/更新數(shù)據(jù)庫(kù)?\r\n??$this->updateDB($order_id,$order_sn,$openid,$total_fee);?\r\n?}else{?\r\n??$result?=?false;?\r\n?}?\r\n?\/\/?返回狀態(tài)給微信服務(wù)器?\r\n?if?($result)?{?\r\n??$str='<\/return_code><\/return_msg><\/xml>';?\r\n?}else{?\r\n??$str='<\/return_code><\/return_msg><\/xml>';?\r\n?}?\r\n?echo?$str;?\r\n?return?$result;?\r\n}<\/pre>\n

為了安全起見(jiàn),對(duì)返回過(guò)來(lái)的簽名,要重新驗(yàn)證:<\/p>\n

\/**?\r\n*?生成簽名?\r\n*?@return?簽名,本函數(shù)不覆蓋sign成員變量?\r\n*\/?\r\nprotected?function?makeSign($data){?\r\n?\/\/獲取微信支付秘鑰?\r\n?require_once?APP_ROOT.\"\/Api\/wxpay\/lib\/WxPay.Api.php\";?\r\n?$key?=?\\WxPayConfig::KEY;?\r\n?\/\/?去空?\r\n?$data=array_filter($data);?\r\n?\/\/簽名步驟一:按字典序排序參數(shù)?\r\n?ksort($data);?\r\n?$string_a=http_build_query($data);?\r\n?$string_a=urldecode($string_a);?\r\n?\/\/簽名步驟二:在string后加入KEY?\r\n?\/\/$config=$this->config;?\r\n?$string_sign_temp=$string_a.\"&key=\".$key;?\r\n?\/\/簽名步驟三:MD5加密?\r\n?$sign?=?md5($string_sign_temp);?\r\n?\/\/?簽名步驟四:所有字符轉(zhuǎn)為大寫(xiě)?\r\n?$result=strtoupper($sign);?\r\n?return?$result;?\r\n}<\/pre>\n

至此,TP中微信支付也就搞定了。這是集成了官方的SDK實(shí)現(xiàn)的,如果不使用SDK,可以使用更簡(jiǎn)單的方法,見(jiàn):PHP實(shí)現(xiàn)微信支付(jsapi支付)和退款(無(wú)需集成支付SDK)<\/p>\n

\"\"<\/p>\n

<\/span><\/p>\n

相信看了本文案例你已經(jīng)掌握了方法,更多精彩請(qǐng)關(guān)注php中文網(wǎng)其它相關(guān)文章!<\/p>\n

推薦閱讀:<\/p>\n

總結(jié)一些MySQL陷阱<\/a>
<\/p>\n

PHP直接實(shí)現(xiàn)生成海報(bào)廣告<\/a>
<\/p>"}

国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial ThinkPHP implements WeChat payment (jsapi payment) process tutorial detailed explanation_php example

ThinkPHP implements WeChat payment (jsapi payment) process tutorial detailed explanation_php example

Mar 24, 2018 am 10:22 AM
javascript thinkphp

This time I will bring you a detailed explanation of ThinkPHP's implementation of jsapi payment. What are the precautions for ThinkPHP's implementation of jsapi payment? The following is a practical case, let's take a look.

The environment at that time did not use a framework. It was implemented by directly creating a new directory under the directory pointed to by a domain name and then accessing the directory. However, there were still some problems when applied to the framework. In ThinkPHP, due to routing rules There is a discrepancy with the payment authorization directory, so an error will be reported. This article talks about the process of integrating WeChat payment in TP.

The SDK and documentation produced by Goose Factory are difficult to understand, and you will know it after using it. Shouldn’t the documentation and SDK be as simple and understandable as possible? Is it possible that only vigorous reconstruction can show the superb technology of Goose Factory programmers? Well...did I expose my rookie attributes...In fact, the SDK is quite easy to use, but as I saw in the previous article, the payment completion callback function is really confusing.

For those who don’t want to be bypassed by the official and want to use WeChat payment in TP, you can take a look at the payment SDK suitable for TP which was restructured and streamlined by a master based on the official documents. I downloaded the source code and read it. Well, the code is very elegant and concise, and the process is very simple and easy to understand. See the blog post for details: http://baijunyao.com/article/78

I still frowned, used the official SDK, and successfully implemented the payment. Let me share the process with you:

1.SDK download and modification

I won’t go into too much detail about this. If you don’t know, you can read my previous article: PHP implements WeChat payment (jsapi payment) process , which details which downloaded files need to be modified.

2. Public account settings

A. You still need to set the web page authorized domain name, this is nothing special;

B. Pay attention to this Payment authorization directory, using TP, many people use the rewrite mode (REWRITE mode) or use the pseudo-static mode while using the REWRITE mode. The generated link at this time is: http://serverName/Home/Blog/read /id/1 ;

If you are using PATHINFO mode, the generated link is: http://serverName/index.php/Home/Blog/read/id/1, such as under the Home module Use a method in the Blog controller to pay. The authorized directory for our payment should be http://serverName/Home/Blog/ or http://serverName/index.php/Home/Blog/, which is based on our own TP. Depends on the URL pattern set.

3. Payment process

(1) Unified order placement

The payment parameter configuration for order placement is basically different from the previous one. Change, the important thing to pay attention to is the payment callback verification link. Because it needs to be called multiple times, I encapsulated the parameter configuration directly in Application/Common/Common/function.php. My SDK is placed in the Api directory under the project root directory. , so the Vendor function is not used when introducing the SDK.

/**?
?*?微信支付?
?*?@param?string?$openId??openid?
?*?@param?string?$goods??商品名稱?
?*?@param?string?$attach??附加參數(shù),我們可以選擇傳遞一個(gè)參數(shù),比如訂單ID?
?*?@param?string?$order_sn?訂單號(hào)?
?*?@param?string?$total_fee?金額?
?*/?
function?wxpay($openId,$goods,$order_sn,$total_fee,$attach){?
?require_once?APP_ROOT."/Api/wxpay/lib/WxPay.Api.php";?
?require_once?APP_ROOT."/Api/wxpay/payment/WxPay.JsApiPay.php";?
?require_once?APP_ROOT.'/Api/wxpay/payment/log.php';?
?//初始化日志?
?$logHandler=?new?CLogFileHandler(APP_ROOT."/Api/wxpay/logs/".date('Y-m-d').'.log');?
?$log?=?Log::Init($logHandler,?15);?
?$tools?=?new?JsApiPay();?
?if(empty($openId))?$openId?=?$tools->GetOpenid();?
?$input?=?new?WxPayUnifiedOrder();?
?$input->SetBody($goods);?????//商品名稱?
?$input->SetAttach($attach);?????//附加參數(shù),可填可不填,填寫(xiě)的話,里邊字符串不能出現(xiàn)空格?
?$input->SetOut_trade_no($order_sn);???//訂單號(hào)?
?$input->SetTotal_fee($total_fee);???//支付金額,單位:分?
?$input->SetTime_start(date("YmdHis"));??//支付發(fā)起時(shí)間?
?$input->SetTime_expire(date("YmdHis",?time()?+?600));//支付超時(shí)?
?$input->SetGoods_tag("test3");?
?//$input->SetNotify_url("http://".$_SERVER['HTTP_HOST']."/payment.php");?//支付回調(diào)驗(yàn)證地址?
?$input->SetNotify_url("http://".$_SERVER['HTTP_HOST']."/payment.php/WexinApi/WeixinPay/notify");?
?$input->SetTrade_type("JSAPI");????//支付類型?
?$input->SetOpenid($openId);?????//用戶openID?
?$order?=?WxPayApi::unifiedOrder($input);?//統(tǒng)一下單?
?$jsApiParameters?=?$tools->GetJsApiParameters($order);?
?return?$jsApiParameters;?
}

Attention, attention, here’s the key point:

The payment callback verification link must be verified without permission. If you access that link yourself, you still need to log in and register for verification. , don't try it, the link must be accessible, and there must be no series of parameters passed.

The best is simple and crude http://serverName/xxx.php. I re-wrote a special one for payment callback in the following directory, similar to index.php Entry file payment.php, and its corresponding module (WexinApi), controller (WeixinPay) and method (notify) in the Application/ directory:

//?檢測(cè)PHP環(huán)境?
if(version_compare(PHP_VERSION,'5.3.0','<&#39;)) die(&#39;require PHP >?5.3.0?!');?
//?$_GET['m']='Admin';?
//?開(kāi)啟調(diào)試模式?建議開(kāi)發(fā)階段開(kāi)啟?部署階段注釋或者設(shè)為false?
define('APP_DEBUG',True);?
//指定模塊控制器和方法?
$_GET['m']='WexinApi';?
$_GET['c']='WeixinPay';?
$_GET['a']='notify';?
//?定義應(yīng)用目錄?
define('APP_PATH','./Application/');?
define("APP_ROOT",dirname(FILE));?
//?引入ThinkPHP入口文件?
require?'./ThinkCore/ThinkCore.php';?
//?親^_^?后面不需要任何代碼了?就是如此簡(jiǎn)單

Now visit http://serverName/payment .php, it will go directly to http://serverName/payment.php/WexinApi/WeixinPay/notify, so the callback verification link can be written as http://serverName/payment.php or http://serverName/payment .php/WexinApi/WeixinPay/notify.

(2) Initiating payment

is still very simple:

/**?
*?支付測(cè)試?
*?微信訪問(wèn):http://daoshi.sdxiaochengxu.com/payment.php/WexinApi/WeixinPay/pay?
*/?
public?function?pay(){?
?$order_sn?=?getrand_num(true);?
?$openId?=?'';?
?$jsApiParameters?=?wxpay($openId,'江南極客',$order_sn,1);?
?$this->assign(array(?
??'data'?=>?$jsApiParameters?
?));?
?$this->display();?
}?
<html>?
<head>?
?<meta http-equiv="content-type" content="text/html;charset=utf-8"/>?
?<meta name="viewport" content="width=device-width, initial-scale=1"/>?
?<title>小尤支付測(cè)試</title>?
?<script type="text/javascript">?
?//調(diào)用微信JS?api?支付?
?function?jsApiCall()?
?{?
??var?data={$data};?
??WeixinJSBridge.invoke(?
???'getBrandWCPayRequest',?data,?
???function(res){?
????WeixinJSBridge.log(res.err_msg);?
????//alert('err_code:'+res.err_code+'err_desc:'+res.err_desc+'err_msg:'+res.err_msg);?
????//alert(res.err_code+res.err_desc+res.err_msg);?
????//alert(res);?
????if(res.err_msg?==?"get_brand_wcpay_request:ok"){?
?????alert("支付成功!");?
?????window.location.href="http://m.blog.csdn.net/article/details?id=72765676"?rel="external?nofollow"?;?
????}else?if(res.err_msg?==?"get_brand_wcpay_request:cancel"){?
?????alert("用戶取消支付!");?
????}else{?
?????alert("支付失敗!");?
????}?
???}?
??);?
?}?
?function?callpay()?
?{?
??if?(typeof?WeixinJSBridge?==?"undefined"){?
???if(?document.addEventListener?){?
????document.addEventListener('WeixinJSBridgeReady',?jsApiCall,?false);?
???}else?if?(document.attachEvent){?
????document.attachEvent('WeixinJSBridgeReady',?jsApiCall);?
????document.attachEvent('onWeixinJSBridgeReady',?jsApiCall);?
???}?
??}else{?
???jsApiCall();?
??}?
?}?
?</script>?
</head>?
<body>?
?<br/>?
?<font color="#9ACD32"><b>該筆訂單支付金額為<span style="color:#f00;font-size:50px">1分</span>錢(qián)</b></font><br/><br/>?
?<font color="#9ACD32"><b><span style="color:#f00;font-size:50px;margin-left:40%;">1分</span>錢(qián)也是愛(ài)</b></font><br/><br/>?
?<p align="center">?
??<button style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer; color:white; font-size:16px;" type="button" onclick="callpay()" >果斷買(mǎi)買(mǎi)買(mǎi)^_^</button>?
?</p>?
</body>?
</html>

However, you should pay attention to the URL of the payment page, because the URL of the payment page must have many parameters. Just now Speaking of the REWRITE mode used in TP, your link is similar to [ http://serverName/Home/Blog/read/id/1 ], which may have more parameters. At this time, WeChat Pay will consider your payment The authorization directory is [http://serverName/Home/Blog/read/id/], but your real authorization directory is [http://serverName/Home/Blog/], so an error will be reported. The solution is to reconstruct the URL when entering the payment page and write it in normal mode, which is [http://serverName/Home/Blog/read?id=1], and that's it.

(3)支持成功回調(diào)

現(xiàn)在支付完成,就會(huì)進(jìn)入到之前寫(xiě)好的鏈接對(duì)應(yīng)的方法,即[? http://serverName/payment.php/WexinApi/WeixinPay/notify]:

//微信支付回調(diào)驗(yàn)證?
public?function?notify(){?
?$xml?=?$GLOBALS['HTTP_RAW_POST_DATA'];?
?//?這句file_put_contents是用來(lái)查看服務(wù)器返回的XML數(shù)據(jù)?測(cè)試完可以刪除了?
?file_put_contents('./Api/wxpay/logs/log.txt',$xml,FILE_APPEND);?
?//將服務(wù)器返回的XML數(shù)據(jù)轉(zhuǎn)化為數(shù)組?
?//$data?=?json_decode(json_encode(simplexml_load_string($xml,'SimpleXMLElement',LIBXML_NOCDATA)),true);?
?$data?=?xmlToArray($xml);?
?//?保存微信服務(wù)器返回的簽名sign?
?$data_sign?=?$data['sign'];?
?//?sign不參與簽名算法?
?unset($data['sign']);?
?$sign?=?$this->makeSign($data);?
?//?判斷簽名是否正確?判斷支付狀態(tài)?
?if?(?($sign===$data_sign)?&&?($data['return_code']=='SUCCESS')?&&?($data['result_code']=='SUCCESS')?)?{?
??$result?=?$data;?
??//?這句file_put_contents是用來(lái)查看服務(wù)器返回的XML數(shù)據(jù)?測(cè)試完可以刪除了?
??file_put_contents('./Api/wxpay/logs/log1.txt',$xml,FILE_APPEND);?
??//獲取服務(wù)器返回的數(shù)據(jù)?
??$order_sn?=?$data['out_trade_no'];?//訂單單號(hào)?
??$order_id?=?$data['attach'];??//附加參數(shù),選擇傳遞訂單ID?
??$openid?=?$data['openid'];???//付款人openID?
??$total_fee?=?$data['total_fee'];?//付款金額?
??//更新數(shù)據(jù)庫(kù)?
??$this->updateDB($order_id,$order_sn,$openid,$total_fee);?
?}else{?
??$result?=?false;?
?}?
?//?返回狀態(tài)給微信服務(wù)器?
?if?($result)?{?
??$str='<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';?
?}else{?
??$str='<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[簽名失敗]]></return_msg></xml>';?
?}?
?echo?$str;?
?return?$result;?
}

為了安全起見(jiàn),對(duì)返回過(guò)來(lái)的簽名,要重新驗(yàn)證:

/**?
*?生成簽名?
*?@return?簽名,本函數(shù)不覆蓋sign成員變量?
*/?
protected?function?makeSign($data){?
?//獲取微信支付秘鑰?
?require_once?APP_ROOT."/Api/wxpay/lib/WxPay.Api.php";?
?$key?=?\WxPayConfig::KEY;?
?//?去空?
?$data=array_filter($data);?
?//簽名步驟一:按字典序排序參數(shù)?
?ksort($data);?
?$string_a=http_build_query($data);?
?$string_a=urldecode($string_a);?
?//簽名步驟二:在string后加入KEY?
?//$config=$this->config;?
?$string_sign_temp=$string_a."&key=".$key;?
?//簽名步驟三:MD5加密?
?$sign?=?md5($string_sign_temp);?
?//?簽名步驟四:所有字符轉(zhuǎn)為大寫(xiě)?
?$result=strtoupper($sign);?
?return?$result;?
}

至此,TP中微信支付也就搞定了。這是集成了官方的SDK實(shí)現(xiàn)的,如果不使用SDK,可以使用更簡(jiǎn)單的方法,見(jiàn):PHP實(shí)現(xiàn)微信支付(jsapi支付)和退款(無(wú)需集成支付SDK)

相信看了本文案例你已經(jīng)掌握了方法,更多精彩請(qǐng)關(guān)注php中文網(wǎng)其它相關(guān)文章!

推薦閱讀:

總結(jié)一些MySQL陷阱

PHP直接實(shí)現(xiàn)生成海報(bào)廣告

The above is the detailed content of ThinkPHP implements WeChat payment (jsapi payment) process tutorial detailed explanation_php example. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to run thinkphp project How to run thinkphp project Apr 09, 2024 pm 05:33 PM

To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

There are several versions of thinkphp There are several versions of thinkphp Apr 09, 2024 pm 06:09 PM

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

WebSocket and JavaScript: key technologies for implementing real-time monitoring systems WebSocket and JavaScript: key technologies for implementing real-time monitoring systems Dec 17, 2023 pm 05:30 PM

WebSocket and JavaScript: Key technologies for realizing real-time monitoring systems Introduction: With the rapid development of Internet technology, real-time monitoring systems have been widely used in various fields. One of the key technologies to achieve real-time monitoring is the combination of WebSocket and JavaScript. This article will introduce the application of WebSocket and JavaScript in real-time monitoring systems, give code examples, and explain their implementation principles in detail. 1. WebSocket technology

How to run thinkphp How to run thinkphp Apr 09, 2024 pm 05:39 PM

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

How to implement an online speech recognition system using WebSocket and JavaScript How to implement an online speech recognition system using WebSocket and JavaScript Dec 17, 2023 pm 02:54 PM

How to use WebSocket and JavaScript to implement an online speech recognition system Introduction: With the continuous development of technology, speech recognition technology has become an important part of the field of artificial intelligence. The online speech recognition system based on WebSocket and JavaScript has the characteristics of low latency, real-time and cross-platform, and has become a widely used solution. This article will introduce how to use WebSocket and JavaScript to implement an online speech recognition system.

How to use JavaScript and WebSocket to implement a real-time online ordering system How to use JavaScript and WebSocket to implement a real-time online ordering system Dec 17, 2023 pm 12:09 PM

Introduction to how to use JavaScript and WebSocket to implement a real-time online ordering system: With the popularity of the Internet and the advancement of technology, more and more restaurants have begun to provide online ordering services. In order to implement a real-time online ordering system, we can use JavaScript and WebSocket technology. WebSocket is a full-duplex communication protocol based on the TCP protocol, which can realize real-time two-way communication between the client and the server. In the real-time online ordering system, when the user selects dishes and places an order

Which one is better, laravel or thinkphp? Which one is better, laravel or thinkphp? Apr 09, 2024 pm 03:18 PM

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.

How to install thinkphp How to install thinkphp Apr 09, 2024 pm 05:42 PM

ThinkPHP installation steps: Prepare PHP, Composer, and MySQL environments. Create projects using Composer. Install the ThinkPHP framework and dependencies. Configure database connection. Generate application code. Launch the application and visit http://localhost:8000.

See all articles