M
M
MR.TOSTER Gipard Valerievich2016-08-23 14:32:15
PHP
MR.TOSTER Gipard Valerievich, 2016-08-23 14:32:15

How to catch url like /Username in php?

On node this is done obviously, but how is it done in php?
Or an alternative.
Is it easier to do this in nginx?
How to direct nginx to only one index.php file and get "myUsername" from url /myUsername in $myVar variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Diunov, 2016-08-23
@zoceb

Let's say /myUsername?a=1&b=2
$_SERVER['REQUEST_URI'] would be /myUsername?a=1&b=2
$_SERVER['DOCUMENT_URI'] would be /myUsername

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question