fopen works in normal PHP but not inside Drupal -
some php code worked well. however, when port code drupal module, $fp = fopen( 'language/unicode-big5.tab', 'r' );
not work expect, giving warning:
warning: fopen(language/unicode-big5.tab) [function.fopen]: failed open stream: no such file or directory in /users/me/documents/html/drupal/sites/all/modules/test_module/language.inc.php on line 197.
i tried put required files , folder in sites/default/files
:
$fp = fopen( file_directory_path().'/language/unicode-big5.tab', 'r' );
returns same warning.
how can fix it?
that work fine.
however message stating path wrong, have tried looking @ path it's trying open?
just following, , correct path accordingly.
echo realpath(file_directory_path() . '/language/unicode-big5.tab');
if path is correct, need check permissions, user have access file @ all? try chmod 777 , see if helps issue, if does, remove chmod 777 , fix accordingly (user/group permissions).
Comments
Post a Comment