downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ibase_blob_info> <ibase_blob_get
[edit] Last updated: Fri, 17 May 2013

view this page in

ibase_blob_import

(PHP 5)

ibase_blob_import Create un blob, copy il file al suo interno e lo chiude

Descrizione

string ibase_blob_import ([ resource $link_identifier ], resource $file_handle )

Questa funzione crea un BLOB e vi inserisce un file intero, lo chiude e restituisce l'id assegnato al BLOB. file_handle รจ un puntatore di file restituito da fopen(). La funzione restituisce FALSE se si verifica un errore.

Vedere anche ibase_blob_add(), ibase_blob_cancel(), ibase_blob_close() e ibase_blob_create().



add a note add a note User Contributed Notes ibase_blob_import - [1 notes]
up
-1
hamacker at bol dot com dot br
9 years ago
Exemplo (Example) :
  $conexao = ibase_connect('servidor:/path/do/arquivo/de/dados.fdb',
                    'SYSDBA',
                    'masterkey',
                    'ISO8859_1',0,3);
// ou voce pega o arqivo via um upload ou
// passara diretamente o path do .jpg
//  $filename =$HTTP_POST_FILES['meuarquivo']['tmp_name'];
// ou
  $filename ='c:\path\do\arquivo.jpg';
  $file = fopen($filename, "r");
  $blob = ibase_blob_import($file);
  $trans=ibase_trans();
  $sth=ibase_prepare($conexao,"UPDATE PRODUTOS SET fotografia=? WHERE coditem= '{$coditem}';");
  $trans=ibase_trans();
  ibase_execute($sth,$blob);
  ibase_commit($trans);
  ibase_free_query($sth);

 
show source | credits | stats | sitemap | contact | advertising | mirror sites