Hi, my problem is extract Winword document from a LONG RAW Oracle 7.3.3 field.
This is my code to extract the document:
<?php
function f_save_doc($nome, &$doc) {
if (!file_exists($nome)) {
$fp = fopen($nome, "w");
fputs($fp, $doc);
fclose($fp);
}
}
$conn = OCILogon("pippo","pluto", "matrix");
$sql = "select worddoc from test where ID = 1";
$stmt = OCIParse($conn, $sql);
OCIExecute($stmt, OCI_DEFAULT);
OCIFetchInto($stmt, &$result_array);
f_save_doc("winword1.doc", $result_array[0]);
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
The problem is that the file winword1.doc is not recognized to be a winword document.
Thank you in advance for your reply