How can the use of .htaccess files impact the display of directory contents on a PHP website?
When a PHP website does not have an index file in a directory, the server may display a list of the directory contents, which can be a security risk. To prevent this, you can use an .htaccess file to disable directory listing. This can be done by adding "Options -Indexes" to the .htaccess file in the directory you want to protect.
# Disable directory listing
Options -Indexes