Where db_mysql.inc.php,config.php,function.php is not really used, the key is the $filename filename, which I read by reading the name of the picture in the database.
!--? php
include_once (' inc/db_mysql.inc.php ');
Include_once (' inc/config.php ');
include_once (' class/function.php ');
Global $picPath; If (Strstr ($_server[http_user_agent], "MSIE")) { $attachment = '; } else { $attachment = ' atachment; '; } $image = getInfo (' newssp_gallery ', ' id ', $_get[' id '); $filename = $picPath. $image [' filename ']; If (!file_exists ($filename)) { $filename = $picPath. " Notexist.gif "; } Header ("Cache-control:no-store, No-cache, must-revalidate");//http/1.1 Header ("Cache-control: Post-check=0, pre-check=0 ", false); Header ("Pragma:no-cache");//http/1.0 Header ("Content-disposition:". $attachment. "Filename=". $image [' original ']); $size = @filesize ($filename); Header ("Content-length: $size"); $FD = @fopen ($filename, RB); $contents = @fread ($FD, $size); @fclose ($FD); Echo $contents;
? |
In the use of the time can be added in the HTML file: 498) this.width=498; ' OnMouseWheel = ' javascript:return big (This) ' src= ' showpic.php?id=xxx ' width= ' Height= ' >
Showpic.php and the above PHP file, id=xxx is the database record id,width is the width of the thumbnail, height is the height of the thumbnail, please do not at the same time the width of the high, for example, you want to achieve a width of 50 thumbnails, as long as 498) this.width= 498, ' OnMouseWheel = ' javascript:return big (This) ' src= ' showpic.php?id=xxx ' width= ' > so that's it.
Editor
http://www.bkjia.com/PHPjc/446847.html www.bkjia.com true http://www.bkjia.com/PHPjc/446847.html techarticle where db_mysql.inc.php,config.php,function.php is not really used, the key is the $filename filename, which I read by reading the name of the picture in the database. Include_once (' Inc/db_mysql ...