묻고답하기

일단 예를 들어서

<?

  $site_name="http://www.yahoo.com/";
  $fp=fopen($site_name."index.html","r");

  while(!feof($fp)) {

        $fl=fgets($fp);
        echo $fl."을 읽었습니다<br>";

        if (ereg("detail", $fl, $dest)) {
                
                $int=sizeof($dest);
                for ($i=0; $i<$int; $i++) {
                
                        echo $i."->".$dest[$i];
                } // end of for
   } else { echo "일치하는 패턴이 없습니다."; } // end of if

  } // end of while
  fclose($fp);

?>

이런식으로 만약에 돌린다고 그러면..

처음에 fopen으로 해서 리턴되는 핸들링변수가 제대로 읽혀지지 않거든요.
다르게 해도 마찮가지든데,, 여러 문서를 봐도 알 수가 없네요. 도움을 주세요 ^^;;