I need to encode a file before i include it to the bank with the code below:
$file = 'CT0001_0002.1.jpg';
$validate = pathinfo($file, PATHINFO_EXTENSION);
list($name,$extension) = explode($validate,$file);
$date = date("Y-m-d H:i");
$cod = md5($name.$date).".".$extension;
echo $cod;
When I print, it returns like this:
6ab87875286005866f0504961fc2438c.
Without the extension. Pathinfo() is enabled on the server. He should return:
6ab87875286005866f0504961fc2438c.jpg