answersLogoWhite

0


Best Answer

Using the standard file() function to read large text files (say greater than 10 Mb) may give problems. You should use fopen() fread() fgets() instead.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the best way to read large files in PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What program can read php file?

PHP files are plain text, so you can read them with your text editor or IDE of choice.


How do you use fopen to read PHP files?

To read PHP files using fopen in PHP, you would first need to open the file using fopen with "r" mode. This opens the file for reading. Remember to check if the file opened successfully, and then you can use functions like fread to read the content of the file. Finally, close the file with fclose when done.


Will php 4.4.7 server support php 5 files?

Yes php 4.4.7 server support php 5 files. But most of the php 5 features are not supported by php 4.4.7 version


Can a php file be valid without any php code?

PHP files are HTML files with any amount of PHP intermingled into it, so the file can be empty or only contain HTML and be valid, yes.


What is the default extension that most Web servers use to process php scripts?

PHP files extension is .php


How can you provide full access to some of your files while giving read-only access to other files?

In PHP you would need to change the file permissions using the function chmod().


How can you provide full access to some of your files while giving read only access to other files?

In PHP you would need to change the file permissions using the function chmod().


How do you open php files in 3d max?

PHP is a programming language. Unless 3D max has a programming interface of some kind, you can't open php files with it. You can open a PHP file with notepad or any other text editor.


Where can one find PHP documents?

You can find PHP documentation on the official PHP website at php.net. The website has comprehensive documentation on PHP functions, classes, and features, as well as user-contributed notes and examples.


How do you get PHP codes for writing on an image?

You can use the GD extension for PHP to edit image files.


Does real player support php?

No it does not support PHP. PHP is a server side processing language while Real Player is a media player which playes audio and video files. Maybe it can play audio and video files located in php folder but that is limited to that.


Why does droid download as php files and not mpeg?

eregi