0
Hello guys I have a question. When I make the request:
GET /Withdraw/30
Since the value "30" is not linked to a key, then you cannot use the $_GET['chave']
.
The way I thought was to do this:
$valor = end(explode("/", $_SERVER['REQUEST_URI']));
It’s not very pretty, but it works.
Is there a better way to do this without using a Framework? In Cakephp I do it well, but without it I’ve complicated the field.
Great guy, I don’t know if it’s worth it for the moment I use it, but I liked the idea and when I need something more robust I know it exists. The application I am making is simple and only has GET request, with a single URL, is a practical source for a job. Thanks for the tips.
– Jeremias Pereira