php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40851 fopen(); returns resource id #2
Submitted: 2007-03-18 23:41 UTC Modified: 2007-03-18 23:48 UTC
From: jjc1231 at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.1 OS: Win 2k Server
Private report: No CVE-ID: None
 [2007-03-18 23:41 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-18 23:48 UTC] johannes@php.net
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

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 13:01:32 2024 UTC