Posted by ZeldorBlat on 09/10/07 14:20
On Sep 10, 10:07 am, howa <howac...@gmail.com> wrote:
> Target: To fetch a file using PHP and send to user
>
> Method 1:
>
> echo file_get_contents( $file_path );
>
> Method 2:
>
> readfile( $file_path );
>
> Which one is better?
In practice it probably doesn't make much of a difference. In this
case, however, I'd use readfile since the function was intended to do
exactly what it is that you're trying to do.
[Back to original message]
|