PHP室宝序竣?php喘送圭塀崙恬抹待夕_PHP教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

推荐:PHP进阶技巧:如何避免表单的重复提交
我想做一个随机的出现的网页,可是用rand()就是不行,听说要初始化随机数,可是怎么初始化,请不吝赐教,谢谢! //第一步:初始化种子 $seedarray =microtime(); $seedstr =split(" &q

凪嶄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'>宸劔祥辛參阻

分享:在PHP中使用随机数的三个步骤详细代码
我想做一个随机的出现的网页,可是用rand()就是不行,听说要初始化随机数,可是怎么初始化,请不吝赐教,谢谢! //第一步:初始化种子 $seedarray =mic

来源:模板无忧//所属分类:PHP教程/更新时间:2008-08-22
相关PHP教程