search

Home  >  Q&A  >  body text

PHP background cannot get variables

Hello teachers, when I uploaded the picture, I made a user ID to pass the value,

$uid = $_SESSION['userid'];

echo $ uid; There is no problem with this, the variable can be output normally.

If I put this variable into the judgment, the value cannot be obtained.

if(!empty($_FILES['avatar_file']['tmp_name'])){

$uid = $_SESSION['userid'];

echo $uid; //POST cannot get the value either.

what should I do then?

依然是小超依然是小超1768 days ago908

reply all(1)I'll reply

  • 依然是小超

    依然是小超2020-02-17 19:22:48

    Already solved it myself

    reply
    0
  • Cancelreply