1
session_start();
//Yes i did call session start but forgot to add it here
print $userID.":::";
$_SESSION['id'] = $userID;
$_SESSION['email'] = $userEmail;
$_SESSION['password'] = $userPassword;
$_SESSION['picture'] = $userProfilePicture;
print "ID: ".$_SESSION['id'];
結果: 1 ::: ID:
我不能將我的任何變量,會話變量在我的代碼,這是爲什麼?我之前做過,代碼是相同的,除了變量
忘了先打電話給session_start()? – yent
你確定你的變量是你認爲的嗎? – bretterer
你有沒有叫'session_start'? –