I have a array which is an image that is saved in the DB, which method do I use to save to the hard drive?
I have a array which is an image that is saved in the DB, which method do I use to save to the hard drive?
You need to package the array and save . Well roughly since you did not give details of what you want, nor demonstrated what you already did you can do so:
foreach ($imagem as $byte) {
$binario .= pack("C", $byte);
}
$arquivo = fopen("arquivo.bin", 'wb');
fwrite($arquivo, $binario);
fclose($arquivo);
The exact way can vary according to your needs.
If the format is already in binary, you can just do the recording:
$arquivo = fopen("arquivo.bin", 'wb');
fwrite($arquivo, $imagem);
fclose($arquivo);