file_ensure_htaccess

Versions
7
file_ensure_htaccess()

If missing, create a .htaccess file in each Drupal files directory.

Related topics

▾ 1 function calls file_ensure_htaccess()

file_unmanaged_copy in includes/file.inc
Copy a file to a new location without calling any hooks or making any changes to the database.

Code

includes/file.inc, line 382

<?php
function file_ensure_htaccess() {
  file_create_htaccess('public://', FALSE);
  file_create_htaccess('private://', TRUE);
  file_create_htaccess('temporary://', TRUE);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.