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

search for in the

ibase_blob_get> <ibase_blob_create
[edit] Last updated: Fri, 25 May 2012

view this page in

ibase_blob_echo

(PHP 4, PHP 5)

ibase_blob_echoブラウザに blob の内容を出力する

説明

bool ibase_blob_echo ( string $blob_id )
bool ibase_blob_echo ( resource $link_identifier , string $blob_id )

この関数は読み込み用に BLOB をオープンし、直接その内容を標準出力 (たいていの場合はブラウザ) に送信します。

パラメータ

link_identifier

InterBase リンク ID。省略した場合は、 最後にオープンしたリンクを使用します。

blob_id

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

参考



add a note add a note User Contributed Notes ibase_blob_echo
int21h 05-Jul-2011 02:11
here is an example if image.php

<?php
if (isset($_REQUEST['imageid']) AND $_REQUEST['imageid']>0) {
   
$db = 'host:/var/db/mydb.fdb';
   
$dbusername = 'sysdba';
   
$dbpassword = 'masterkey';
   
$query = "SELECT IMAGEDATA, MIME FROM IMAGES WHERE IMAGEID=".$_REQUEST['imageid'];
   
$dbh = ibase_connect($db, $dbusername, $dbpassword, 'UTF8') or die('Couldn't connect DB);
   
$result = ibase_query($query);   
   
$data = ibase_fetch_object($result);
    if (
$data)
    {
       
header("Content-type: ".$data->MIME);
       
ibase_blob_echo ($data->IMAGEDATA);
    }
   
ibase_close($dbh);
}
?>

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