<sigh>
If you don't take the advice when it's given, it won't be of much help.
Your complaint about readfile() is that it doesn't do what you want. If you read the manual, you'd find this:
int readfile (string filename, int [use_include_path])
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.
This is exactly the behavior you are complaining about ... it is how readfile() is SUPPOSED to work.
You want to read the file into a variable. I suggested that you read the manual page on the file() function. Did you do that?
array file (string filename [, int use_include_path])
Identical to readfile(), except that file() returns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached.
If you want a string instead of an array, read the manual page on implode().