PHPBuilder - one line file read



RSS Twitter
Tips Php Functions

one line file read

by: Steven Rebello
|
August 19, 2002

In order to avoid the hassle of doing a fopen, fread etc, you can read a file using the following one line:


$contents = implode("",@file( $filename ) );

Many may already know this, just thought it would help those who don't.

HTH

steven

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Steven Rebello

Comment:



Comment:

(Maximum characters: 1200). You have characters left.