Drupal 7: Get files public directory path

We used to get the files directory using file_directory_path() in Drupal 5 and 6, the function was removed with Drupal 7 but you can still get the files public directory like this:

echo variable_get('file_public_path', conf_path() . '/files'); 
// Output: sites/default/files
Categorized: Drupal

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>