Is there a way to access a string as a filehandle in php?

前端 未结 5 2010
遥遥无期
遥遥无期 2020-12-17 17:22

I\'m on a server where I\'m limited to PHP 5.2.6 which means str_getcsv is not available to me. I\'m using, instead fgetcsv which requires \"A valid file pointer to a file s

5条回答
  •  感情败类
    2020-12-17 17:58

    You can use stream handles such as php://memory to achieve what you're after. Just open, fwrite, rewind, and you should be able to use fgetcsv.

提交回复
热议问题