TAILIEUCHUNG - The php anthology 2nd edition 2007 - phần 8

Chúng tôi bao gồm lớp DatabaseSession của chúng tôi, sau đó khởi tạo đối tượng DatabaseSession. Tiếp theo, chúng tôi sử dụng session_set_save_handler đăng ký PHP phương pháp tùy chỉnh của chúng tôi sessionhandling | 362 The PHP Anthology Simpo PDF Merge and Split Unregistered Version - http session_start name isset _SESSION name _SESSION name if name echo Welcome name to your session else echo Lets start the session _SESSION name PHP We include our DatabaseSession class then instantiate the DatabaseSession object. Next we use session_set_save_handler to register our custom PHP sessionhandling methods. Then we have a quick little demonstration to show us that the session is working the first time you load the web page you should see the message Let s start the session We then set the _SESSION name to PHP. When you refresh the web page the message should change to Welcome PHP to your session which indicates that our session data is being stored and retrieved correctly in the database. Welcome to database-saved sessions Summary In this chapter we ve investigated HTTP authentication and PHP sessions and created a complete access control system that can manage user registrations password resets and changes including authorization groups and multiple permission levels. Phew Well there you have it total access control over your site Now you have the power to bark Denied at those that shouldn t be in restricted areas and roll out the red carpet for those that should. Can you feel the warm glow of power gathering within you Will you use it for good or evil Either way I hope you ve enjoyed it and learned a bit along the way. Simpo PDF Merge and Split Unregistered Version - http Chapter 11 Caching In the good old days when building web sites was as easy as knocking up a few HTML pages the delivery of a web page to a browser was a simple matter of having the web server fetch a file. A site s visitors would see its small text-only pages almost immediately unless they were using particularly slow modems. Once the page was downloaded the browser would cache it somewhere on the local computer so that should the page be requested again after performing a quick

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.