This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
david27453
I'm trying to create an array with all the images from a folder but I keep getting a count of 0. Anybody have any ideas. Code follows
function onStart()
{
$theDir = "/october/storage/app/media/slider/";
$fils = glob($theDir . "*.jpg");
$this->page["res"] = count($fils);
}
In case anyone comes across this (unanswered at time of posting) the answer, as I have now worked out seems to be to change $theDir as follows: $theDir = storage_path() . "/app/media/slider/";
Last updated
1-1 of 1