mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
20 lines
423 B
PHP
20 lines
423 B
PHP
<?php
|
|
if(($conn = odbc_connect($dsn, $dbuser, $dbpwd))){
|
|
if(($res = odbc_do($conn, "select gif from php_test where id='$id'"))){
|
|
odbc_binmode($res, 0);
|
|
odbc_longreadlen($res, 0);
|
|
if(odbc_fetch_row($res)){
|
|
header("content-type: image/gif");
|
|
odbc_result($res, 1);
|
|
exit;
|
|
}else{
|
|
echo "Error in odbc_fetch_row";
|
|
}
|
|
} else {
|
|
echo "Error in odbc_do";
|
|
}
|
|
} else {
|
|
echo "Error in odbc_connect";
|
|
}
|
|
?>
|