Use fopen
, fread
and fclose
to read a file sequentially:
$handle = fopen($filename, 'r');
if ($handle) {
while (!feof($handle)) {
echo fread($handle, 8192);
}
fclose($handle);
}
More Related Contents:
- PHP Upload fails for Video but not Image [closed]
- PHP create file with specific name [closed]
- How to force file download with PHP
- How to write into a file in PHP?
- Upload a file using PHP
- Need to write at beginning of file with PHP
- Read a plain text file with php
- including php file from another server with php
- How to check if a file exists from a url
- Move_uploaded_file() function is not working
- Deleting all files from a folder using PHP?
- PHP: Check if a file is loaded directly instead of including?
- Read a file backwards line by line using fseek
- Save current page as HTML to server
- How to read a list of files from a folder using PHP? [closed]
- uploading a file in chunks using html5
- PHP: Read Specific Line From File
- PHP Warning: move_uploaded_file() unable to move
- PHP Case Insensitive Version of file_exists()
- How can I view/open a word document in my browser using with PHP or HTML
- PHP move_uploaded_file() error?
- Replace string in text file using PHP
- How to save memory when reading a file in Php?
- List and download clicked file from FTP
- Max file number can php upload at same time
- How can I get the current script file name, but without the extension “.php”?
- Difference between file, file_get_contents, and fopen in PHP
- A PHP script to let users download a file from my website without revealing the actual file link in my website?
- Copy file from remote server or URL [duplicate]
- php script to delete files older than 24 hrs, deletes all files