Also, what are the permissions on the file you are trying to open and how are you running php? Are you executing code from the CLI or is your script hosted by Apache?
You might want to check the file with [man]is_readable[/man] before trying to open it.