You are here

function file_htaccess_lines in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/file.inc \file_htaccess_lines()

Returns the standard .htaccess lines that Drupal writes to file directories.

Parameters

bool $private: (Optional) Set to FALSE to return the .htaccess lines for a web-accessible public directory. The default is TRUE, which returns the .htaccess lines for a private directory that should not be web-accessible.

Return value

string The desired contents of the .htaccess file.

Deprecated

in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. Use \Drupal\Component\PhpStorage\FileStorage::htaccessLines().

Related topics

File

core/includes/file.inc, line 390
API for handling file uploads and server file management.

Code

function file_htaccess_lines($private = TRUE) {
  return FileStorage::htaccessLines($private);
}