Slim PHP and GET Parameters

后端 未结 9 676
猫巷女王i
猫巷女王i 2021-01-30 03:56

I\'m playing with Slim PHP as a framework for a RESTful API, and so far it\'s great. Super easy to work with, but I do have one question I can\'t find the answer to. How do I gr

9条回答
  •  情书的邮戳
    2021-01-30 04:38

    Not sure much about Slim PHP, but if you want to access the parameters from a URL then you should use the:

    $_SERVER['QUERY_STRING']
    

    You'll find a bunch of blog posts on Google to solve this. You can also use the PHP function parse_url.

提交回复
热议问题