Re: [PHP4BETA] readfile() problems
| From: | Ben Schumacher | Date: | Sat, 04 Dec 1999 04:27:40 +0000 |
| Subject: | Re: [PHP4BETA] readfile() problems | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-7380@lists.php.net to get a copy of this message | ||
Matt-
The readfile() function works as so: (from php documentation)
Reads a file and writes it to standard output.
Returns the number of bytes read from the file. If an error occurs, false is returned and unless the function was called as @readfile, an error message is printed.
So basically, you're telling it to read the file, then with the "echo" to print out "the number of bytes read from the file."
Basically, if you just drop the echo in front of the readfile() line, it should work perfectly.
Hope this helps,
-Ben Schumacher
At 10:56 PM 12/3/99 -0500, Matt Greene wrote:
In this peice of script i am using readfile to read the file, but whenever it puts it into the textarea it also adds it's filesize of the file im opening to the end of it? How can i get it to not put the file size at the end? echo "<form action=\"galleryadmin.php3?page=$page\" method=\"POST\">"; echo "<textarea rows='20' name='test' cols='50'>"; echo $file = readfile($imall); echo "</textarea>"; echo "<input type='hidden' name='page' value=$imall>"; echo "<INPUT type=\"submit\" NAME=\"submitButton\" VALUE=\"done\">"; echo "</form>"; -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net