View Single Post

  #4 (permalink)  
Old 10-17-2006
gp
 
Posts: n/a
Default Re: warning: rewind() supplied argument is not a valid stream resource in...


Back to this issue? My seek function hates me and index 0....any
ideas?

> I was attempting to add a seek method but am stymied by the above
> warnin, as well getting a seek on index 0 (zero) to work.
> public function myseek($intPos) {
> $myPos = 0;
> $this->rewind();
> while ( $myPos < $intPos && $this->valid() ) {
> $cktl = $this->next();
> $myPos++;
> }
> if ( !$this->valid() ) {
> die("Invalid seek position");
> }
>
> return $cktl;
> }


Reply With Quote