Some PHP code worked well. However, when I port the code into a Drupal module, the
$fp = fopen( 'language/unicode-big5.tab', 'r' );
warning: fopen(language/unicode-big5.tab) [function.fopen]: failed to open stream: No such file or directory in /Users/me/Documents/Html/drupal/sites/all/modules/test_module/language.inc.php on line 197.
$fp = fopen( file_directory_path().'/language/unicode-big5.tab', 'r' );
That will work perfectly fine.
However the message is simply stating that your path is wrong, have you tried a simply looking at what path it's trying to open?
Just do the following, and correct the path accordingly.
echo realpath(file_directory_path() . '/language/unicode-big5.tab');
If the path is correct, then you need to check permissions, does that user have access to the file at all? Try a chmod 777 and see if that helps the issue, if it does, remove the chmod 777 and fix it accordingly (user/group permissions).