TAILIEUCHUNG - Professional Information Technology-Programming Book part 90

Tham khảo tài liệu 'professional information technology-programming book part 90', 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ả | Other Security Features In addition to Safe Mode PHP provides a number of functions that allow you to place restrictions on the features available to PHP. Hiding PHP You can use the expose_php directive in php. ini to prevent the presence of PHP being reported by the web server as follows expose_php On By using this setting you can discourage automated scripts from trying to attack your web server. Usually the HTTP headers contain a line that looks like the following Server Apache Unix PHP mod_ssl OpenSSL With the expose_php directive enabled the PHP version is not included in this header. Of course the . php file extension is a giveaway to visitors that PHP is in use on a website. If you want to use a totally different file extension you need to first find the following line in AddType application x-httpd .php Then you need to change . php to any file extension you like. You can specify any number of file extensions separated by spaces. To have PHP parse . html and . htm files so there is no indication that a server-side language is being used at all you can use the following directive AddType application x-httpd .html .htm Parsing HTML Configuring your web server to parse all HTML files with PHP may be convenient but a small performance hit is involved because the PHP parser needs to fire up even if there is no server-side code in a web page. By using a different file extension for static pages you can eliminate the need for PHP to be involved where it is not necessary. Filesystem Security Safe Mode restricts filesystem access only to files owned by the script owner and you can use the open_basedir directive to specify the directory in which a file must reside. If you specify a directory PHP will refuse any attempt to access a file that is not in that directory or its subdirectory tree. The open_basedir directive works independently of Safe Mode. To restrict filesystem access on your web server to only the tmp directory you .

Đã 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.