Bug #76288 [Com]: I cannot open .txt files with file_get_contents, but I can open other files.
| From: | spam2 at rhsoft dot net | Date: | Mon, 30 Apr 2018 14:32:39 +0000 |
| Subject: | Bug #76288 [Com]: I cannot open .txt files with file_get_contents, but I can open other files. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214992@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76288&edit=1
ID: 76288
Comment by: spam2 at rhsoft dot net
Reported by: im_not_gonna_tell_ya at yahoo dot com
Summary: I cannot open .txt files with file_get_contents, but
I can open other files.
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: 7.2.5
Block user comment: N
Private report: N
New Comment:
for sure not - php don't care about extensions or file-types here
set error_repprting to E_ALL and look at your errors
pretty sure your test-script is not what you are running in reality
Previous Comments:
------------------------------------------------------------------------
[2018-04-30 14:28:24] im_not_gonna_tell_ya at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/features.commandline.io-streams
---
Test script:
---------------
#This works fine
$x = file_get_contents('example.html');
#This does NOT work
$x = file_get_contents('example.txt');
#Both files exist on the server and have exactly the same content and permissions
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76288&edit=1