How can I read all the bytes in a document with fread() instead of entering a certain number?
Thanks,
Joe
How do I read all the characters?
Moderator: General Moderators
-
joetheeskimo5
- Forum Commoner
- Posts: 43
- Joined: Sun Dec 14, 2003 4:47 pm
- Location: US
- Contact:
Code: Select all
$contents = fread($handle, filesize($filename));Or file_get_contents or file if you want each line as an array element.
Code: Select all
<?php
$fp = fopen($filename, "r");
$filecontents = fread($fp, filesize($filename));
?>