Professional Information Technology-Programming Book part 88

Tham khảo tài liệu 'professional information technology-programming book part 88', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Summary In this lesson you have learned how to detect and handle errors in PHP scripts. In the next lesson you will learn about the various PHP settings that you can configure to suit your particular needs. Lesson 23. PHP Configuration In this lesson you will learn how to configure global PHP settings at runtime using the file and per-directory settings using .htaccess. Configuration Settings PHP allows you to tune many aspects of its behavior by using a set of configuration directives. These directives can be global for your entire web server or you can make local changes that apply only to certain scripts. Using PHP s configuration file is named php. ini. Its location is set at compile time by default it is located in usr local lib php. ini on Linux Unix servers and C WINDOWS php. ini on Windows systems. The php .ini file contains a list of configuration directives and their values separated by equals signs. The default php. ini file distributed with PHP is well documented with plenty of comments. Any line that begins with a semicolon is considered a comment and sections of the file are broken up using headings in square brackets which the compiler also ignores. Listing shows an extract from an unchanged php .ini file for PHP 5 that contains the log settings. As you can see for many setting changes you do not even need to refer to the online documentation. Listing . An Extract from Print out errors as a part of the output . For production web sites you re strongly encouraged to turn this feature off and use error logging instead see below . Keeping display_errors enabled on a production web site may reveal security information to end users such as file paths on your Web server your database schema or other information. display_errors On Even when display_errors is on errors that occur during PHP s startup sequence are not displayed. It s strongly recommended to keep display_startup_errors off except for when debugging. .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
2    552    2    02-07-2024
Đã 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.