
April 18th, 2004, 11:11 AM
|
|
Contributing User
|
|
Join Date: Apr 2004
Posts: 184
Time spent in forums: 1 Day 20 h 24 m 34 sec
Reputation Power: 5
|
|
|
How to upload and download a file to/from Oracle?
I am trying to write a script in php to enable the user to upload and download a file (of any type and size) to Oracle. I have find the script for mysql but there is nothing for Oracle.
i created a table with a BLOB field.
I think i have managed to upload a file to this table using the following script(is it correct?)
PHP Code:
$userfile="lar1.jpg";
$handle=fopen($userfile, "r");
$data = fread($handle, $size);
fclose($handle);
$sql = "INSERT INTO myfiles VALUES ('$data')";
$stmt= OCIParse($femisconn, $sql);
OCIExecute($stmt);
now how do i download it?
My script my not be correct. any suggestion for uploading and downloading a file to Oracle?
Last edited by pabloj : April 18th, 2004 at 11:46 AM.
Reason: added appropriate Php tags
|