⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 odbc_binmode.php3

📁 linux操作系统中 php 核心编程所有例程 都是一些很不错的案例
💻 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 + -