Is there a function in Drupal 7 to convert "public: //filename.pdf" to "/path_to_public_directory/filename.pdf"? I found a function that connected the path of the circuit, but cannot find one that does the opposite.
You can use file_create_url() to do just that:
file_create_url()
$uri = 'public://filename.pdf'; $path = file_create_url($uri);
Use conf_path () to find the path to the file directory.
<?php $drupal_files = conf_path() . "/files"; print "The Files Directory: " . $drupal_files; ?>
http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/conf_path
drupal_realpath ($ URI) Allows an absolute path to a local URI file or file path. https://api.drupal.org/api/drupal/includes!file.inc/function/drupal_realpath/7
Source: https://habr.com/ru/post/1383104/More articles:Accuracy, scale, amount, split .. Truncation - sql-serverhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1383100/passing-parameters-tofrom-javascript-rails&usg=ALkJrhh9u52ZqqPu_ZdyZvWoRTz5hYvsSwUsing jQuery on () with objects in memory - javascriptHow to set og: url when a locale is required? - facebookCSS selector not allowed when using middleware UI - htmlIs there any way to prevent Grails from leaking to production-mode processing on tomcat despite the JVM flags - tomcatHow to find outlines in an image in OpenCV? - c ++PHP / mySQL: mysql_query with SELECT, FROM and WHERE - phpOpenCV 2.2 VS2010 - Get "Read Access Violations" in very simple code - c ++Eclipse HTML Tag Autocomplete - eclipseAll Articles