Answer the question
In order to leave comments, you need to log in
How to deal with $_SERVER['REQUEST_URI'] XAMPP?
Hello!
I'm analyzing the structure of MVC frameworks by video and ran into such a problem.
I have a local site (localhost/site-folder/site-files)
And when I send a request $_SERVER['REQUEST_URI'], in the response the path along with "site-folder", and therefore the router does not work correctly.
That is, for example, the site has a link localhost/site2/index.php
And in fact (should be) $_SERVER['REQUEST_URI'] = index.php, if index.php is opened, but returns "site2/index.php"
Like correct this situation? Through .htaccess? Via xampp config? All climbed, there is no solution anywhere
Answer the question
In order to leave comments, you need to log in
why use $_
if there is a framework. After all, there can be many problems with direct access.
And essentially (should be) $_SERVER['REQUEST_URI'] = index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question