Currently in the PHP Slim3 framework, there is a concept of PSR-7, looked at, it seems to be the original PHP global variables to encapsulate a bit, more OOP a little, I have been familiar with Django before and feel like WSGI. I don't know if these two are just one type of things. Currently in the PHP Slim3 framework, there is a concept of PSR-7, looked at, it seems to be the original PHP global variables to encapsulate a bit, more OOP a little, I have been familiar with Django before and feel like WSGI. I don't know if these two are just one type of things.
Reply content:
Currently in the PHP Slim3 framework, there is a concept of PSR-7, looked at, it seems to be the original PHP global variables to encapsulate a bit, more OOP a little, I have been familiar with Django before and feel like WSGI. I don't know if these two are just one type of things.
Let's take a look at the descriptions on the official website.
1. WSGI
WSGI is the Web Server Gateway Interface. It is a specification that describes how a web server communicates with web applications, and how web applications can be chained together to process one request.
WSGI is a Python standard described in detail in PEP 3333.
PSR-7
PSR-7: HTTP message interfaces
This document (HTTP message desribetion) describes common interfaces for representing HTTP messages as described in RFC 7230 and RFC 7231, and URIs for use with HTTP messages as described in RFC 3986.
We should be able to see the difference.
WSGI isWeb Server Gateway Interface
, That isServer Gateway InterfaceThis article describes how the Web server communicates with your python cgi program, what do you want to talk about, and what tasks I have on this side. After you have done this, let me know the results, I told the guy in the browser to go.
SoPSR-7
What about it? It isPSR
A new member of the family, isHTTP message interfaces
. This is related to the difference between python and php as web development languages. That is to say,PSR-7
A set of standards are defined to standardize the use of PHP for HTTP Communication, replacing the super global variables provided by PHP itself because they are slightly poor.