Hello, I made an image upload system, in which, the saved images, are saved with $id_o.$extensao
= 1_o.jpg, now, I'm creating an element that, with that image name, returns the relative path of this image, the problem is that my pathinfo (dirname) is returning only one '. '(dot), if anyone can give me a light. Thank you in advance.
foreach ($fotos as $valor => $foto){
$extension = pathinfo(WWW_ROOT . 'files' . DS . 'galeria' . DS . "{$foto['Foto']['id']}_o.{$foto['Foto']['extension']}",PATHINFO_DIRNAME);
echo $extension;
}