From: | "Papp Gyozo" <pgerzson(at)freestart(dot)hu> |
---|---|
To: | Chris Smith <csmith(at)squiz(dot)net>, "Zhidian Du" <duzhidian(at)hotmail(dot)com>, pgsql-php(at)postgresql(dot)org |
Subject: | Re: Are these steps correct and standard way to upload |
Date: | 2002-11-11 23:38:56 |
Message-ID: | E18BXbd-0003Lp-00@relay.freestart.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
2002. november 8. 05:45 dátummal Chris Smith ezt írta:
| Hi,
|
| >I check the posts about uploading images from browser. No one give
| > me a whole procedure how to do it. My friend told me I can upload
| > binary/image file using following steps:
| >
| > exec("cp $pic $File");
|
| Use the move_uploaded_image function in PHP. Safer and easier.
The proper name of the function mentioned here is move_uploaded_file().
See: http://php.net/move_uploaded_file
Snippet from the PHP Manual on how to writing BLOBs into PostgreSQL
databases:
<?php
$database = pg_connect ("dbname=jacarta");
pg_query ($database, "begin");
$oid = pg_lo_create ($database);
echo "$oid\n";
$handle = pg_lo_open ($database, $oid, "w");
echo "$handle\n";
pg_lo_write ($handle, "large object data");
pg_lo_close ($handle);
pg_query ($database, "commit");
?>
--
Papp, Győző
- pgerzson(at)freestart(dot)hu
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Gordon | 2002-11-12 10:19:23 | Compiling Postgresql --with-unixodbc |
Previous Message | scott.marlowe | 2002-11-11 18:24:16 | Re: Backing up the database via browser |