php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19065 file() error.
Submitted: 2002-08-23 05:44 UTC Modified: 2002-08-23 08:05 UTC
From: vjavierc at hotmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.2.2 OS: Windows 98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vjavierc at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-08-23 05:44 UTC] vjavierc at hotmail dot com
Hi everybody.

Well, thi fact is that I'm using the file() function, but it seems that is not working for me.

I'm using a text file, 6 lines long, and just try this:

$file = "foo.txt";
$myarray = file( $file );

and foo.txt just have this:

abc
def
ghi
jkl
mno
pqr

So, I try and use fopen():

$file = "foo.txt";
if(file_exists($file))
{
  $fd = fopen( $file, "r" ); // I try with "rb", and get
                             // same error.

} 

now, I use the debugger and it happens that $fd == nil when it opens the file...... of course, I try reading the file anyway but it just don't work.....

Can someone please tell me where is my stupid error?....

thankx.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-23 08:05 UTC] sniper@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Dec 05 13:01:23 2020 UTC