Get image src by ID

Permalink
Can't find this basic thing in documentation. HALP. =(
My C5 version is 8.2.0.

View Replies: View Best Answer
ramonleenders replied on at Permalink Best Answer Reply
ramonleenders
<?php
$yourFile = File::getByID(1234);
$yourFileSrc = is_object($yourFile) ? $yourFile->getURL() : false;
?>


The "$yourFileSrc" variable should either be a string to the location or be a boolean (false) if the file could not be found.