#40851 [Opn->Bgs]: fopen(); returns resource id #2

From: Date: Sun, 18 Mar 2007 23:48:51 +0000
Subject: #40851 [Opn->Bgs]: fopen(); returns resource id #2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110489@lists.php.net to get a copy of this message
ID: 40851 Updated by: johannes@php.net Reported By: jjc1231 at gmail dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Win 2k Server PHP Version: 5.2.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2007-03-18 23:41:13] jjc1231 at gmail dot com Description: ------------ Is this a problem with my php congig or just doesn't work with IIS 5/Windows? At first it said that i did not have access to the file, so i allowed read-only in the permissions, and then it said resource id #2. This also happens when opening a url Thanks in advance Reproduce code: --------------- LOCAL FILE CODE: <?php $file = fopen('C:\Inetpub\wwwroot\test.txt', 'r'); echo $file; ?> URL CODE: <?php $file = fopen('http://www.google.com', 'r'); echo $file; ?> Expected result: ---------------- it opens the contents of the file or url i type in which the browser would display, because the contents are html tags... Actual result: -------------- resource id #2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40851&edit=1

« previous php.bugs (#110489) next »