mirror of
https://github.com/php/php-src.git
synced 2024-12-17 05:50:14 +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";
|
|
}
|
|
?>
|