From the manual: [fopen] Returns a file pointer resource on success, or FALSE on error.
Looks like your fopen
call is failing. Try using an absolute URL to your text file. Make sure your folder is CHMODded correctly and the file also (777 permissions)