TAILIEUCHUNG - Pro PHP Patterns, Frameworks, Testing and more phần 8

tôi khuyên bạn nên sử dụng phiên bản mới hơn nếu bạn muốn thực sự tận dụng lợi thế của thư viện cả các trình duyệt hiện đại. Các kịch bản trong Ví dụ 18-5 sẽ thử các tuyến đường hiện đại đầu tiên và sẽ rơi trở lại với phương pháp ActiveX nếu đối tượng XHR bản địa là không có sẵn. Bảng 18-1 | CHAPTER 16 ADVANCED ZEND FRAMEWORK 241 Get the log instance log Zend_Registry get log Log an emergency message with the encountered exception log- emerg errorHandler exception - toString This integration logs the exception to a file instead of displaying it to the user. This will allow you to create a custom error page for your users without losing any of that critical debugging error detail. Tip Logging a uniqid along with your error message and displaying the unique code to the user can aid in production debugging by allowing you to correlate a user s experience with log-file information. Caching Caching is a critical part of any reasonably complex application. Whether you are caching static pages or just the result of a SQL query it is critically important to the performance of your application that caching is sufficiently utilized. The Zend Framework provides both block-level partial caching and entire-page caching. Deciding when to use each is very important as caching certain requests will lead to significant headaches as well as significant security problems. Caching Security Considerations Here are some guidelines for safe caching Cache data where the request s inputs will result in the same output with each page generation. For example home pages are an excellent caching opportunity. Do not cache any data that is the product of input that may contain personal information. It may be used to create cross-domain scenarios that violate your users privacy and create significant liability for your business. Be sure that caching the output of the page will not circumvent your security model and allow other users to read pages cached by a specific user. Take extreme caution when caching pages that require any sort of authentication to access as circumvention possibilities are increased. To better understand the security implications of caching think of a web site with a member s area that contains a dashboard. You could create a scenario where when a user logs

TÀI LIỆU MỚI ĐĂNG
Đã 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.