Subject | Re: [ib-support] ibase_blob_echo |
---|---|
Author | Vince Duggan |
Post date | 2002-06-10T15:48:54Z |
Here is a PHP example where I send an image to the browser. The only
difference is that you would need a different content type, prolly something
like 'application/x-gzip'. Note that you must call the header() function
BEFORE you issue any output at all beck to the browser. Blank lines before
PHP section will cause the header function to fail.
<?
ibase_pconnect("mydatabase.gdb","username","password", "none", 100, 1);
$Q = ibase_query("select image from images where clientno = $CLIENTNO");
if ($R = ibase_fetch_object($Q))
{
header ("Content-type: image/jpeg");
ibase_blob_echo($R->IMAGE);
}
else
{
header ("Content-type: image/gif");
readfile("noimage.gif");
}
ibase_free_result($Q);
ibase_commit();
?>
difference is that you would need a different content type, prolly something
like 'application/x-gzip'. Note that you must call the header() function
BEFORE you issue any output at all beck to the browser. Blank lines before
PHP section will cause the header function to fail.
<?
ibase_pconnect("mydatabase.gdb","username","password", "none", 100, 1);
$Q = ibase_query("select image from images where clientno = $CLIENTNO");
if ($R = ibase_fetch_object($Q))
{
header ("Content-type: image/jpeg");
ibase_blob_echo($R->IMAGE);
}
else
{
header ("Content-type: image/gif");
readfile("noimage.gif");
}
ibase_free_result($Q);
ibase_commit();
?>
----- Original Message -----
From: <jef.mony@...>
To: <ib-support@yahoogroups.com>
Sent: Monday, 10 June, 2002 2:54 PM
Subject: [ib-support] ibase_blob_echo
Is there somebody with a sample to use the ibase_blob_echo php function
with a binary blob like a zip file.
Thanks a lot.
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/