📄 odbc_binmode.php3
字号:
<HTML>
<HEAD>
<TITLE>odbc_binmode</TITLE>
</HEAD>
<BODY>
<?
// get a GIF from a database and send it to browser
// connect to database
$connection = odbc_connect("store", "admin", "secret");
// execute query
$query = "SELECT picture ";
$query .= "FROM employee ";
$query .= "WHERE id=17 ";
$result = odbc_do($connection, $query);
// make sure binmode is set for binary pass through
odbc_binmode($result, 0);
// make sure longreadlen mode
// is set for echo to browser
odbc_longreadlen($result, 0);
// get the first row, ignore the rest
odbc_fetch_row($result);
// send header so browser knows it's a gif
header("Content-type: image/gif");
// get the picture
odbc_result($result, 1);
?>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -