Re: Are these steps correct and standard way to upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxxx



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux