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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 21:01:29 2024 UTC