note 58662 deleted from function.file-get-contents by nlopess

From: Date: Sun, 16 Apr 2006 22:34:40 +0000
Subject: note 58662 deleted from function.file-get-contents by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108294@lists.php.net to get a copy of this message
Note Submitter: netjester at zoite dot net ---- It is worth noting that file_get_contents() appends a newline ("\\n") character to each file it retrieves. I used substr() to eliminate the unwanted newline. <?php $myfile = substr(file_get_contents('oneline.txt'),0,-1); ?>

« previous php.notes (#108294) next »