Enviar búsqueda
Cargar
รายงานพรีเซน Sessioncookie
•
Descargar como DOC, PDF
•
0 recomendaciones
•
510 vistas
Bongza Naruk
Seguir
Denunciar
Compartir
Denunciar
Compartir
1 de 11
Descargar ahora
Recomendados
C:\Documents And Settings\Admin\Desktop\งานนำเสนอฝึกงานกลุ่มสิบสอง
C:\Documents And Settings\Admin\Desktop\งานนำเสนอฝึกงานกลุ่มสิบสอง
washira
Jsp
Jsp
Bongza Naruk
ภาษา Jsp
ภาษา Jsp
Bongza Naruk
การเพ มข_อม_ลลงฐานข_อม_ลด_วยภาษา jsp&sql
การเพ มข_อม_ลลงฐานข_อม_ลด_วยภาษา jsp&sql
Bongza Naruk
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
Bongza Naruk
Update&delete
Update&delete
Bongza Naruk
Sec.1 กล ม 1 เร__องการสร_างแบบฟอร_มและการส_งค_าต_วแปร
Sec.1 กล ม 1 เร__องการสร_างแบบฟอร_มและการส_งค_าต_วแปร
Bongza Naruk
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Recomendados
C:\Documents And Settings\Admin\Desktop\งานนำเสนอฝึกงานกลุ่มสิบสอง
C:\Documents And Settings\Admin\Desktop\งานนำเสนอฝึกงานกลุ่มสิบสอง
washira
Jsp
Jsp
Bongza Naruk
ภาษา Jsp
ภาษา Jsp
Bongza Naruk
การเพ มข_อม_ลลงฐานข_อม_ลด_วยภาษา jsp&sql
การเพ มข_อม_ลลงฐานข_อม_ลด_วยภาษา jsp&sql
Bongza Naruk
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
Bongza Naruk
Update&delete
Update&delete
Bongza Naruk
Sec.1 กล ม 1 เร__องการสร_างแบบฟอร_มและการส_งค_าต_วแปร
Sec.1 กล ม 1 เร__องการสร_างแบบฟอร_มและการส_งค_าต_วแปร
Bongza Naruk
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
Más contenido relacionado
Destacado
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
Destacado
(20)
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
รายงานพรีเซน Sessioncookie
1.
1 žคุกกี้ (Cookies) ž คุกกี้
คือ Text file ขนาดเล็ก ที่มีขนาดในแต่ละชุดไม่ เกิน 4 kB โดยถูกจำาเก็บอยู่บนเครื่องคอมพิวเตอร์ด้านฝั่งของ ไคลเอนต์หรือผู้ใช้โปรแกรม Browser ž ภายในคุกกี้แต่ละตัวจะมีส่วนประกอบไปด้วย ชื่อ คุกกี้ (Name) ค่าคุกกี้ (Value) และวันหมดอายุ (Expiry Date) พร้อมกับข้อมูลเกี่ยวกับ Host และ Path ž Cookies ถูกสร้างขึ้นเมื่อไร ž โดยปกติ Cookies จะถูกกำาหนดมาพร้อมกับข้อมูล ที่ Web Server ส่งมาให้กับ Client โดยจะอยู่ในส่วนของ HTTP Header ž เมื่อฝั่ง Client ได้รับ HTTP Header มา และตรวจ สอบพบว่ามี Cookies ส่งมาด้วยหรือไม่ ถ้ามี Client จะนำา ข้อมูลนั้นมาสร้างเป็นแฟ้มข้อมูล Cookies เก็บไว้ที่เครื่องของ ฝั่ง Client เอง ข้อมูล Cookies ที่เก็บไว้ฝั่ง Client นี้ เรา สามารถเขียนโปรแกรมเพื่อดึงค่าเหล่านี้มาใช้ประโยชน์ได้ ดัง จะได้กล่าวต่อไป ž การสร้างและลบ Cookies ž การเข้าถึง Cookie ž การเข้าถึง Cookie ทำาได้หลายวิธีในที่นี้จะ กล่าวถึง 2 วิธี อ้างถึงชื่อ Cookie โดยตรง เช่น ž echo $TestCookie; //TestCookie คือชื่อ Cookie
2.
2 ž อ้างผ่าน $HTTP_COOKIE_VARS[] ž
echo $HTTP_COOKIE_VARS[TestCookie] ž // TestCookie คือชื่อ Cookie รูปแบบของ Cookkie ž
3.
3 ตัวอย่าง : Cookie
4.
4 การรันหน้า Form ของ
Cookie ตัวอย่าง : Cookie ตัวอย่าง : Cookie
5.
5 ตัวอย่าง : การรัน
Cookie ž เซสชั่น (Session)
6.
6 ž เซสชั่น (Session)
เป็นตัวแปรชนิดหนึ่งที่ถูกสร้างขึ้นและ เก็บไว้ที่ Web Server โดยเซสชั่นนี้จะหมดอายุเมื่อเราทำาการ ปิดบราวเซอร์ของ Client ž ตัวลูกข่าย (Client) จะติดต่อกับ Session โดยอาศัย Session ID ที่ Web Server ส่งมาให้ ž สร้างเซสชั่น (Session) ž เริ่มสร้างเซสชั่นด้วยฟังก์ชัน session_start() เมื่อใช้คำาสั่ง session_start() แล้วตัว Client จะได้รับ session id เราสามารถดู session id ได้ด้วยคำาสั่ง session_id() ลงทะเบียนเซสชั่น เพื่อสร้าง ตัวแปรเซสชั่น สร้างตัวแปรเซสชั่น โดยใช้ฟังก์ชั่น session_register() session_register (ชื่อตัวแปร[, ชื่อตัวแปร...]) $ชื่อตัวแปร = "ค่าที่กำาหนดให้ตัวแปร" ตัวอย่าง session_register("myname"); //ลงทะเบียนตัวแปร $myname $myname = "สมชาย" ž สร้างตัวแปรเซสชั่น โดยใช้ตัวแปรเซสชั่น $HTTP_SESSION_VARS
7.
7 $HTTP_SESSION_VARS['ชื่อตัวแปร'] = ค่าที่กำาหนด ž
ตัวอย่าง $HTTP_SESSION_VARS['name']='sompot'; //สร้างตัวแปรเซสชั่น name สร้างตัวแปรเซสชั่น โดยใช้ตัวแปรโดยใช้ตัวแปรเซสชั่น $_SESSION $_SESSION['ชื่อตัวแปรเซสชั่น']= ค่าที่จะก าหนด ž ตัวอย่าง $_SESSION['name']='sompot'; //สร้างตัวแปรเซสชั่น name ž การยกเลิกตัวแปรเซสชั่น และการทำาลายเซสชั่นทั้ง หมด การยกเลิกตัวแปรเซสชั่นโดยเจาะจงเฉพาะตัวแปรเซสชั่น บางตัว สามารถทำาได้โดยใช้คำาสั่ง unset($_SESSION['ชื่อตัวแปรเซสชั่น']) session_unregister(ชื่อตัวแปร); ž เราสามารถทำาลายเซสชั่นทั้งหมดได้โดยใช้คำาสั่ง ž session_unset(); session_destroy();
8.
8 รูปแบบ Session ตัวอย่าง :
Session
9.
9 ตัวอย่าง : การรัน
Session ตัวอย่าง : การเรียกค่าของ Session
10.
10 ตัวอย่าง : การรัน
Session อ้างอิง
11.
11 http://code.function.in.th/jsp/cookie http://www.chiangkham.ac.th/krudui/index.php/se ssion
Descargar ahora