Rewind pointer to locate the problem! It seems that the rewind pointer has an error. what is the problem? The code is as follows: & nbsp; $ fpstr = fopen (& quot; php: // input & quot;, & quot; rb & quot ;);... slightly $ bin = fread ($ fpstr, 2); // read-only 2 bytes... locate the problem with the rewind pointer!
It seems that the rewind pointer has an error. what is the problem?
The code is as follows:
$ Fpstr = fopen ("php: // input", "rb ");
...
$ Bin = fread ($ fpstr, 2); // read-only 2 bytes
...
Fseek ($ fpstr, 0); // error reported here
// Use $ fpstr Resource again
$ RealSize = stream_copy_to_stream ($ fpstr, $ tmp); // at this time, the newly created file is missing two bytes.
How to locate the pointer to the beginning of $ fpstr to complete the file.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.