분류 전체보기933 php 파일로 이미지 부르기 $qry="select * from test where p_id=$p_id"; $rs=mysql_query($qry) or die(mysql_error()); $row=mysql_fetch_array($rs); $pic=$row[p_url]; $up_hit=$row[p_hit]+1; $pic_header=getimagesize($pic); $qry_up="update test set p_hit=$up_hit where p_id=$p_id"; mysql_query($qry_up) or die('line14'.mysql_error()); Header('Content-Type: image/$pic_header[mime]'); /*$fp=fopen($pic,"r"); //스트리밍 $count = fread($f.. 2008. 10. 14. PHP str_replace * str_replace $content=str_replace($content, "''", "'"); $content=str_replace($content, " ", chr(32)); $content=str_replace($content, ""); $content=str_replace($content, "&", "&"); $content=str_replace($content, chr(13), " "); * today $today=date("Y-m-d h:i"); 2008. 10. 14. PHP 게시판 페이징 처리 $skippage=10; $pagesize=20; if(!$page){ $page=1; } $kkk=($page-1)*$pagesize; if(!$cmd){ $qry_cnt="SELECT * FROM tech WHERE field_no=$field_no"; $qry="SELECT * FROM tech WHERE field_no=$field_no ORDER BY wdate DESC LIMIT $kkk, $pagesize"; }else{ switch($sec){ case 1: $qry_cnt="SELECT * FROM tech WHERE field_no=$field_no AND subject LIKE '%$string%'"; $qry="SELECT * FROM tech WHERE field_no=$field.. 2008. 10. 14. 이미지 액박 오류 표시 안되게 하기 간혹 이미지 파일이 불러지지 않아서 이미지가 액박이 나는 경우가 있다. x 표시가 참 보기 싫을 때 있다. 이를 때 아예 표시 안되도록 하는 옵션 onerror="this.style.display='none';" 을 추가 하면 된다. 적용예) 2008. 10. 10. 이전 1 ··· 204 205 206 207 208 209 210 ··· 234 다음