getting variables from STRING url in php

后端 未结 5 2069
情深已故
情深已故 2021-01-20 11:34

If I have a url that looks like this, what\'s the best way to read the value

http://www.domain.com/compute?value=2838

I tried parse_u

5条回答
  •  执念已碎
    2021-01-20 11:54

    You can use parse_url and then parse_str on the query.

    
    

    Prints:

    Array
    (
        [value] => 2838
    )
    

提交回复
热议问题