file_build_uri

file_build_uri($path)

Constructs a URI to Drupal's default files location given a relative path.

Related topics

File interface
Common file handling functions.

File

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

Code

1
2
3
4
function file_build_uri($path) {
  $uri = file_default_scheme() . '://' . $path;
  return file_stream_wrapper_uri_normalize($uri);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.