i have some code for UPLOAD and DOWNLOAD files on server, but it is not work correctly. Result: i'm try to download uploaded file, but seen this: /tmp/phpUkLSm9!
Please help me to find error.
UPLOAD code
pg_exec ($dbase,"begin");
$oid=pg_locreate ($dbase);
$handle=pg_loopen($dbase, $oid, "w");
pg_lowrite($handle, "$prodfile");
pg_loclose($handle);
pg_exec($dbase, "commit");
//where $prodfile=<INPUT TYPE=FILE NAME=prodfile>
DOWNLOAD code:
pg_exec ($dbase,"begin");
$handle=pg_loopen($dbase, $prod_fileoid, "r");
pg_loreadall($handle);
pg_loclose($handle);
pg_exec($dbase, "commit");
//where $prod_fileoid - object id from database
Thank you!