Read & Return Data From Files Into PHP


Reading File Data

If you have written data to a file from PHP, or you have a file on your server you need to read with PHP, there are quite a few ways you can do it. The four ways we will cover here are fread (), fgets (), file (), and file_get_contents(). The one you choose is based upon your needs, and how the data in the file you are accessing is formatted.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s