所以我试图facebook
在我的网站中集成登录。因为不想使用的人facebook
可以使用我们网站的登录系统,我们创造了一种设置cookies和会话的方法。我也想为用户创建cookies
和session
变量facebook
。
但是,我收到此错误:
Warning: Cannot modify header information - headers already sent by (output started at /home/content/88/10590088/html/Test4/index.php:9) in /home/content/88/10590088/html/Test4/login.php on line 144
Warning: Cannot modify header information - headers already sent by (output started at /home/content/88/10590088/html/Test4/index.php:9) in /home/content/88/10590088/html/Test4/login.php on line 145
第 145 行和第 144 行是下面的最后两行:
// CREATE THEIR SESSIONS AND COOKIES
$_SESSION['userid'] = $db_id;
$_SESSION['username'] = $db_username;
setcookie("id", $db_id, strtotime( '+30 days' ), "/", "", "", TRUE);
setcookie("user", $db_username, strtotime( '+30 days' ), "/", "", "", TRUE);