Manager::getUrlFromFile
Attention! We strongly recommend first to learn more about Sites module REST documentation to understand how the module functions (with REST available in Bitrix24 Self-hosted editions). View this documentation as useful source when working with Bitrix24 Self-hosted editions and find out more details about API and only REST is not enough.
public static function Manager::getUrlFromFile( $path );
Converts file path to URL based on current domain and protocol.
Parameters
Parameter | Description | Version |
---|---|---|
path | File path. |
Example
if (\Bitrix\Main\Loader::includeModule('landing')) { echo \Bitrix\Landing\Manager::getUrlFromFile( '/upload/landing/aaa/1.jpg' ); } //http://24.local.bx/upload/landing/aaa/1.jpg
© «Bitrix24», 2001-2024