| Versions | |
|---|---|
| 7 | file_ensure_htaccess() |
If missing, create a .htaccess file in each Drupal files directory.
drupal/
<?php
function file_ensure_htaccess() {
file_create_htaccess('public://', FALSE);
if (variable_get('file_private_path', FALSE)) {
file_create_htaccess('private://', TRUE);
}
file_create_htaccess('temporary://', TRUE);
}
?>