note 123347 added to function.file-get-contents
| From: | DavidSpector@php.net | Date: | Thu, 15 Nov 2018 22:38:09 +0000 |
| Subject: | note 123347 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209713@lists.php.net to get a copy of this message | ||
Every once in a while I use file_get_contents to read in a local PHP file, and am surprised when the
result is not false, yet cannot be seen on the screen. This strangeness is caused by the fact that
displaying a PHP file sends the "<?php" and following characters to the browser, which
then responds by hiding the PHP code. To verify this, use the "view source" or similar
command in your browser to see the output more directly. The displayed PHP code will then appear in
the source file output window. One simple workaround is to display the local PHP file in a
<textarea> element.
----
Server IP: 208.43.231.9
Probable Submitter: 98.2.238.89
----
Manual Page -- http://php.net/manual/en/function.file-get-contents.php
Edit -- https://master.php.net/note/edit/123347
Del: integrated -- https://master.php.net/note/delete/123347/integrated
Del: useless -- https://master.php.net/note/delete/123347/useless
Del: bad code -- https://master.php.net/note/delete/123347/bad+code
Del: spam -- https://master.php.net/note/delete/123347/spam
Del: non-english -- https://master.php.net/note/delete/123347/non-english
Del: in docs -- https://master.php.net/note/delete/123347/in+docs
Del: other reasons-- https://master.php.net/note/delete/123347
Reject -- https://master.php.net/note/reject/123347
Search -- https://master.php.net/manage/user-notes.php