php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10253 fopen returns pointer to empty file
Submitted: 2001-04-09 17:16 UTC Modified: 2001-04-09 19:53 UTC
From: mlane at nucleus dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3pl1 OS: Slackware Current
Private report: No CVE-ID: None
 [2001-04-09 17:16 UTC] mlane at nucleus dot com
<?
$fp=fopen ("/usr/local/apache/htdocs/sales.nationalonline.ca/test/test.file", "r+");
print $fp;
if (!$fp) print "error";
else $rt=filesize($fp);
print $rt;
print "blue:";
?>
 Resource id #1blue:

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-09 19:53 UTC] sniper@php.net
1. Read the manual page for filesize() at http://www.php.net/filesize
(hint: It wants a filename as parameter)

2. If this was just buggy example script and you can 
reproduce whatever happens with latest CVS snapshot from http://snaps.php.net/ then reopen this bug report.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC