hi,
I previously used slim framework 2 to display images with the following code:
$app->get(’/image/p/:data’, function ($data) use ($app) {
$image = @file_get_contents(“http://localhost/main/media/image/p/$data”);
$app->response->header(‘Content-Type’, 'content-type: '.FILEINFO_MIME_TYPE);
if ($image === FALSE){
$app->render(‘error404.page’);
}else{
echo $image;
}
});
and now, how to display with slim framework 3 ?
Thanks