note 87817 added to function.file-get-contents

From: Date: Tue, 23 Dec 2008 22:37:14 +0000
Subject: note 87817 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-148484@lists.php.net to get a copy of this message
I am facing an issue with file_get_contents() and am not able to reason with it. file.txt contains the following text: background = &quot;$FPG_bgcolor&quot; My php code is as follows: <?php $FPG_bgcolor = "#FFFFFF"; $FPG_template = file_get_contents('file.txt'); echo "$FPG_template"; ?> In the output, $FPG_template is not replaced with #FFFFFF. However, if i put all the contents of file.txt as a string variable in my code, it all works fine. ---- Server IP: 59.162.86.33 Probable Submitter: 122.162.239.79 ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- https://master.php.net/note/edit/87817 Del: integrated -- https://master.php.net/note/delete/87817/integrated Del: useless -- https://master.php.net/note/delete/87817/useless Del: bad code -- https://master.php.net/note/delete/87817/bad+code Del: spam -- https://master.php.net/note/delete/87817/spam Del: non-english -- https://master.php.net/note/delete/87817/non-english Del: in docs -- https://master.php.net/note/delete/87817/in+docs Del: other reasons-- https://master.php.net/note/delete/87817 Reject -- https://master.php.net/note/reject/87817 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148484) next »