어떻게 한 줄 씩 파일 을 읽 습 니까?

dim input(30)'는 배열 을 정의 합 니 다.크기 는 언제든지 변경 할 수 있 습 니 다.여 기 는 편리 함 을 표시 하기 위해 서 입 니 다.filepath=Server.Mappath("index.html")Set fs=Server.CreateObject("Scripting.FileSystemObject")Set file_open=fs.OpenTextFile(file_path)n=0Do While Not file_open.AtEndOfStreamn=n+1fileline=file_open.readlineinput(i)=fileline'파일 내용 을 input 배열 에 읽 습 니 다.Loop fileopen.closeSet fs=Nothing 또한 바 이 너 리 데이터 에 대해 서 는 read()로 읽 을 수 있 습 니 다.예 를 들 어 fileopen.read(200)는 file 을 읽 는 것 입 니 다.open 의 200 개의 데이터.

좋은 웹페이지 즐겨찾기