Code: Select all
$filename = temp_file_from_form;
$handle = fopen($filename, "r");
$blob_data = fread($handle, filesize($filename));
fclose($handle);
$sql = "Store Procedure with Parameters, one of them the blob";
$stmt = $db->PrepareSP($sql);
$db->InParameter($stmt, $id, 'id');
$blob = $db->InParameter($stmt, $blob_data, 'photo',-1, OCI_B_BLOB);
$db->StartTrans();
$ok = $db->Execute($stmt);First few characters of each file. Notice the diff characters in the second line
The original
Code: Select all
%PDF-1.3
%âãÏÓ
5 0 obj
<<
/Length 197
/Filter /FlateDecode
>>Code: Select all
%PDF-1.3
%¿¿¿¿
5 0 obj
<<
/Length 197
/Filter /FlateDecode
>>