How did the framework of thinkphp become a web server? give me WeChat Mini Programs to test.

recently, I was learning from WeChat Mini Programs. I hung up with the server provided in the book, and then I found a source code. visual observation is a framework of thinkphp. I don"t know how to use it when I download it. The goal I want to achieve is to let me test WeChat Mini Programs, because he is a test server for api, and then my computer has installed the integrated environment of phpstudy. I hope there are great gods who can help me and explain it in more detail. Thank you ![

.

  1. the THinkphp framework becomes a web server, and the title has already made my scalp numb.
  2. you need to know the routing access rules of Thinkphp, otherwise you won't know where to request WeChat Mini Programs's request.
  3. remember that Thinkphp also needs to set up some cross-domain configuration CORS.
  4. if you can, you can just write a php source code to test, which is easy.

  1. Open the HOSTS file and add:

      127.0.0.1 api
  2. Open phpstudy, open site Domain name Management, and configure a local domain name, that is, the domain name where your api is located
  3. Open Wechat developer tool, click "details" on the right, and select: do not verify legal domain name, web-view (business domain name), TLS version and HTTPS certificate
  4. if the url you originally requested is https, please change it to http for the time being.

at this point, if your php code has implemented the functionality of the interface, you should be able to test it properly.


if your TP project is not put online, Wechat seems not to allow you to use it.


after local configuration of HOSTS, debugging is enabled in Wechat's editor!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e469fa-43f23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e469fa-43f23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?