Treat variable as a file


/ Published in: PHP
Save to your folder(s)

Occasionally you'll have a string and need to pass it to a function that will only take a filehandle (such as fgetcsv). Here's how to create a virtual filehandle in memory.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.