php get variables as key with no value assigned

前端 未结 5 1537
执笔经年
执笔经年 2021-01-12 11:45

If I enter the following into the browser:

   http://domain.com/script.php?1234

And script.php has the following script:

           


        
5条回答
  •  攒了一身酷
    2021-01-12 12:01

    Nothing can be officially correct, if it works for you then by all means use it. Btw the issue with that is matching what value is what.

    When you have example.com?1234&4567 Then you will have two values with no key name to tell you what is what.

    But if you want to do away with ugly url's, you should look into mod_rewrite

    Beginners guide

    Another beginners guide

提交回复
热议问题