时间:2021-07-01 10:21:17 帮助过:17人阅读
分页
$sqlstr = "select count(*) as recount from photo";$query = mysql_query($sqlstr) or die(mysql_error());$result = mysql_fetch_assoc($query);$recount = $result['recount'];$pagesize = 3;$page = isset($_GET['page'])? $_GET['page'] : 1;$offset = ($page-1)*$pagesize;$sqlstr = "select * from photo limit $offset, $pagesize";$query = mysql_query($sqlstr) or die(mysql_error());while($thread=mysql_fetch_assoc($query)){ echo '';}
$id = isset($_GET['id'])? $_GET['id'] : 0;$sqlstr = "select * from photo where id='".$id."'";$query = mysql_query($sqlstr) or die(mysql_error());$result = mysql_fetch_assoc($query);if($result){ header('content-type:'.$result['type']); echo $result['binarydata'];}
谢谢!感激涕零啊,有些东西初学者琢磨半天也可能搞不明白,还是需要多问问好
谢谢!感激涕零啊,有些东西初学者琢磨半天也可能搞不明白,还是需要多问问好
谢谢!感激涕零啊,有些东西初学者琢磨半天也可能搞不明白,还是需要多问问好