Forum und email

gzseek

(PHP 4, PHP 5)

gzseek — 지정된 .gz 파일을 검색한다.

Description

int gzseek ( int $zp , int $offset )

파일 스트림 내부에서 zp참조로 지정된 파일 포지션을 offset으로 이동한다. C에서 gzseek( zp, offset, SEEK_SET )의 호출과 동일하다.

만약 파일이 읽기속성으로 열린 경우, 이 함수는 에뮬레이트 될 수 있지만 매우 느릴수도 있다. 만일 쓰기 속성으로 열린경우에는, 오직 순차검색만을 지원한다. :gzseek는 새 시작위치까지 0의 연속으로 압축한다.(이상해서 원문을 포함합니다.) 원문:If the file is opened for reading, this function is emulated but can be extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position.

성공할 경우 0을 반환하고; 그렇지 않은 경우 -1을 반환한다. EOF를 지나는 검색은 error을 고려하지 않는다.

참고 gztell(), gzrewind().