1. 云栖社区>
  2. PHP教程>
  3. 正文

PHP室宝序竣?php喘送圭恬抹待夕-PHP编程教程

作者:用户 来源:互联网 时间:2017-12-01 14:54:00

编程教程

PHP室宝序竣?php喘送圭恬抹待夕-PHP编程教程 - 摘要: 本文讲的是PHP室宝序竣?php喘送圭恬抹待夕-PHP编程教程, db_mysql.inc.php,config.php,function.php音屎喘欺?囚$filename 周兆,厘宥函方象垂夕兆各 <?phpinclude_once ('inc/db_mysql.

db_mysql.inc.php,config.php,function.php音屎喘欺?囚$filename 周兆,厘宥函方象垂夕兆各

<?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;
?>

喘扮昨辛委html

<img src='showpic.php?id=xxx' width='50' height='50'>
showpic.php式中椎php周,id=xxx方象垂芝村ID,width抹待夕,height抹待夕互,音揖扮互,箭泌?低?50抹待夕?峪<img src='showpic.php?id=xxx' width='50'>宸祥辛阻

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索编程教程 喘 ,以便于您获取更多的相关知识。