메뉴 건너뛰기

pds

엥.. file에서 bit단위로 읽어서, 비교하는 코드

박영식2003.12.25 19:33조회 수 9117댓글 0

    • 글자 크기
// db관련 파일 인크루드
        include "conf.php";
$connect = mysql_connect("localhost", $dbname, $dbpass);
$result=mysql_select_db($dbname, $connect);
if ( !$connect ) {
echo " 데이터베이스에 연결할 수 없습니다.";
}

$fp = fopen("hanja.txt","r");
if(!$fp) {
   echo("Failed to open the file");
}
while(!feof($fp)) {
   $line = fgets($fp,3);

$sql = "select * from chinese where china='$line'";
$result = mysql_query($sql, $connect);
$row = mysql_fetch_object($result);
if(!$row->id){
echo("$row->id");
}
}
fclose($fp);
박영식 (비회원)
    • 글자 크기
쿠키로 새창 열림 여부 정하기 (by 박영식) php 주요 함수 (by 박영식)

댓글 달기

첨부 (0)
위로