getPath() on 5.7.3
Permalink
I change code from 5.6 to 5.7
My Image block have bellow it on 5.6
$f = File::getByID($this->fID);
$fullPath = $f->getPath();
In 5.7.3
following error occur.
call_user_func_array() expects parameter 1 to be a valid callback, class 'Concrete\Core\File\Version' does not have a method 'getPath'
How shuld I do?
My Image block have bellow it on 5.6
$f = File::getByID($this->fID);
$fullPath = $f->getPath();
In 5.7.3
following error occur.
call_user_func_array() expects parameter 1 to be a valid callback, class 'Concrete\Core\File\Version' does not have a method 'getPath'
How shuld I do?
Thank you. But I want to get fullpath.
getURL() is URL string.
getRelativePath() is relative path
How do I get full path on server.
getURL() is URL string.
getRelativePath() is relative path
How do I get full path on server.
I meaning this
BASE_URL.DIR_REL.$f->getRelativePath()
BASE_URL.DIR_REL.$f->getRelativePath()
I meaning this
BASE_URL.DIR_REL.$f->getRelativePath()
BASE_URL.DIR_REL.$f->getRelativePath()
Perhaps
$filePath = $_SERVER['DOCUMENT_ROOT'].File::getRelativePathFromID( $id);
$filePath = $_SERVER['DOCUMENT_ROOT'].File::getRelativePathFromID( $id);
public function getRelativePath()
public function getURL()
I think "getURL()" is the one you are looking for so try something like this: