|
 |
|
อยากทราบวิธีการลบ cookies ใน codeigniter ครับ ผมลบแล้วมันไม่ออกครับ |
|
 |
|
|
 |
 |
|
Code (PHP)
setcookie("login", "", time()-3600);
setcookie("username", "", time()-3600);
setcookie("password", "", time()-3600);
Go to : PHP Cookies ($_COOKIE,$HTTP_COOKIE_VARS)
|
 |
 |
 |
 |
Date :
2011-10-17 21:16:37 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
http://codeigniter.com/user_guide/helpers/cookie_helper.html
พยายามดูจากเอกสารของมันครับ มันมีบอกหมดทุกอย่างแล้ววิธีเขียนเบื้องต้น
delete_cookie("name");
คุณเล่นยัดลงไปหลายๆชื่อคุกกี้ในคำสั่ง delete เดียวมันจะทำงานได้ยังไงอะครับ?
delete_cookie($name, $domain, $path, $prefix) นี่คือค่าที่มันรับได้
delete_cookie("login","username","password"); คุณใส่ลงไปแบบนี้ ก็กลายเป็นลบคุกกี้ที่ชื่อ login โดเมน username พาธ password
มันจะหาเจอมั้ยล่ะครับ ผมไม่เข้าใจไปหาคำสั่งลบแบบนี้จากไหนกัน ในคู่มือก็มีบอกวิธีเขียนที่ถูกต้องอยู่แท้ๆ
ลองแก้ให้ถูกครับ ยังไงก็ work
|
 |
 |
 |
 |
Date :
2011-10-18 09:23:16 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|