function tinybrowser_file_directory_path in TinyBrowser 7
Implements obsolete file_directory_path().
2 calls to tinybrowser_file_directory_path()
- tinybrowser_admin_profile in ./
tinybrowser.profile.inc - Admin profile
- tinybrowser_sample_profile in ./
tinybrowser.profile.inc
File
- ./
tinybrowser.profile.inc, line 6
Code
function tinybrowser_file_directory_path() {
$path = drupal_realpath('public://');
// it returns absolute path such as '/www/d7/html/sites/default/files'
$docroot = $_SERVER['DOCUMENT_ROOT'];
// it returns absolute path of web server's root such as '/www/d7/html'
$path = str_replace($docroot, '', $path);
$path = preg_replace('/^\\//', '', $path);
// we get path from DOCUMENT_ROOT such as 'sites/default/files'
return $path;
}