TAILIEUCHUNG - Beginning PHP and Postgre SQL E-Commerce From Novice to Professional phần 3

Trước hết, hãy chắc chắn mục mới, bạn thêm vào để được cấu hình đúng. Nếu bạn đang chạy trang web của bạn trên một cổng khác với mặc định là 80 (nói, nếu bạn đang sử dụng cổng 8080), hãy chắc chắn rằng bạn chỉ định cổng chính xác trong HTTP_SERVER_PORT không đổi. | CHAPTER 3 CREATING THE PRODUCT CATALOG PART I 105 4. Modify presentation templates like this li a selected_d href departments_list- mDepartments i .link prepare_link http raquo departments_list- mDepartments i .name a li How It Works Preparing Links First of all make sure the new entry you added to is configured correctly. If you re running your web site on a different port than the default of 80 say if you re using port 8080 make sure you specify the correct port in the HTTP_SERVER_PORT constant. We also defined a constant named USE_SSL which specifies whether the site is supposed to generate HTTPS URLs. If the constant is set to no your site won t generate any HTTPS links even for the places that should normally be secured. Let s see how this works. The code you ve just added to the presentation tier is a Smarty modifier. The Smarty modifier is used as shown by the modifications you ve implemented in and and it transforms the relative links received as parameters to absolute links. The prepare_link Smarty modifier takes as parameter the name of the protocol that should be used to generate the links if http is passed an HTTP URL will be generated if https is passed an HTTPS URL will be generated. Take the example of the link in the header a href prepare_link http This link will be transformed to an absolute link by our Smarty modifier which will arrive to the client like this a href http If you wanted that particular link to be accessed only through HTTPS then you could use the Smarty modifier like this a href prepare_link https This modifier would transform the link to a href https Note that if the USE_SSL constant is set to no then HTTP will be used even if the parameter is https. You can reload the web site to ensure that nothing s broken. Note In case you aren t using the hatshop alias as explained in Chapter 2 you ll need to

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.