How to use variable inside parameter $_GET? example: ($_GET[$my_var])

后端 未结 4 972
太阳男子
太阳男子 2021-01-26 07:23

I\'m developing a plugin for wordpress, the parameter of the $ _GET is recorded in the database according to the preference of the User via the Wordpress Admin Panel. The follow

4条回答
  •  孤城傲影
    2021-01-26 07:54

    I found the problem, i had already tested all of these options, but ever dont working, the problem was that I was testing the function inside the main page of my site, and on the main page (mysite.com) does not get the parameter (?page=nossuport), so always returning null values​​, when I used the variable in the GET or used the echo $GET[$my_var] to test.. It was a great carelessness of mine, would never work...

    by the way, the two parameters works correctly:

    $_GET[$url_before]
    $_GET["$url_before"]
    

    The Problem are solved, Thanks for help.

提交回复
热议问题