fopen returns Resource id #4

前端 未结 4 2002
独厮守ぢ
独厮守ぢ 2021-01-21 15:10


        
4条回答
  •  执念已碎
    2021-01-21 15:56

    Because fopen() returns a resource pointer to the file, not the content of the file. It simply opens it for subsequent reading and/or writing, dependent on the mode in which you opened the file.

    You need to fread() the data from the resource referenced in $handle.

    This is all basic stuff that you could have read for yourself on the manual pages of php.net

提交回复
热议问题