You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is something I did in psr7-middlewares. It's a middleware to include php files, usefull if you want to adapt old-style websites to the middleware approach. Let's say we have a website with the following files:
site/
index.php
about.php
contact.php
Each page has it's own php file, so the urls are something like http://example.com/about.php, http://example.com/contact.php, etc. The middleware allow to use urls like http://example.com/about, include the php file, capture the output body and headers and return a response with that. It works as a wrapper for old websites.
I needed this in an old project and worked fine, the only problem I found was related with global variables, but was easy to solve.
The text was updated successfully, but these errors were encountered:
This is something I did in psr7-middlewares. It's a middleware to include php files, usefull if you want to adapt old-style websites to the middleware approach. Let's say we have a website with the following files:
Each page has it's own php file, so the urls are something like
http://example.com/about.php
,http://example.com/contact.php
, etc. The middleware allow to use urls likehttp://example.com/about
, include the php file, capture the output body and headers and return a response with that. It works as a wrapper for old websites.I needed this in an old project and worked fine, the only problem I found was related with global variables, but was easy to solve.
The text was updated successfully, but these errors were encountered: