search

Home  >  Q&A  >  body text

Teacher, please see how to solve this problem?

123.png

王翼王翼2620 days ago1506

reply all(8)I'll reply

  • debug error

    debug error2018-01-09 21:45:52

    Remove inheritance from the parent class parent and change empty to if(USER_ID==''){code}.............Same as the second one, try it

    reply
    0
  • 鸢尾花

    鸢尾花2018-01-03 17:43:28

    Why are you reporting an error again? Mine is not. There is no error message. How did you do it?

    reply
    0
  • 沉睡の黑暗

    沉睡の黑暗2017-09-25 12:10:48

    In the class, just use private variables to keep logged in user information,

    reply
    0
  • PHP中文网

    PHP中文网2017-09-22 18:02:22

    $this->uid=Session::get('user_id');

    Change the USER_ID below to $this->uid

    reply
    0
  • 鸢尾花

    USER_ID is a custom constant, there is no point in changing it

    鸢尾花 · 2018-01-03 19:00:43
  • PHP中文网

    PHP中文网2017-09-22 17:57:13

    It is not recommended to define constants in the class initialization function. You can try moving the define outside the class.

    reply
    0
  • vine

    Move outside the User class and pass smoothly! Thank you.

    vine · 2017-10-22 23:41:43
    鸢尾花

    How to move it

    鸢尾花 · 2018-01-03 19:01:46
    .

    Can't solve it

    . · 2018-05-02 13:56:27
  • Cancelreply