Can't use function return value in write context

后端 未结 3 990
离开以前
离开以前 2020-12-20 19:44

Ok, here is my code. What it is supposed to do is retrieve the referer that sent you to the page, the user will type someurl.com/refcreate.php?ref=username

&         


        
相关标签:
3条回答
  • 2020-12-20 20:31

    You're assigning a variable and not comparing it

    This refcheck($referer) = false

    Should be refcheck($referer) == false

    Also, your method should have a default return if your IF condition fails.

    0 讨论(0)
  • 2020-12-20 20:45

    ok i figured out hte problem or problems rather 1 was it need to look like this if(refcheck($referer) == false){} instead of if(refcheck($referer) = false); so a missing equal sign and a misplaced colon :P thanks guys

    0 讨论(0)
  • 2020-12-20 20:48

    you misspelled "check" in the third line

    0 讨论(0)
提交回复
热议问题