module_load_include not working including inc file I am trying to make it work, but it seems simply not working in Drupal 6. Maybe this is the issue, it does not work on D6?

This is the code:

// $file_path = module_load_include('inc', 'MYMODULE.inc', 'includes/MYMODULE.inc');
$file_path = module_load_include('MYMODULE', 'MYMODULE.inc');

// Testing.
if ($file_path === FALSE) {
  dpm('Failed to include: ' . $filename);
}
else {
  dpm('Successfully included: ' . $file_path);
}


I have tried also adding a drupal_load before and some other things, like changing params, moving the inc file to the root module folder and so, but I allways get the same:

Failed to include: sites/all/modules/MYCOMPANY/MYMODULE/MYMODULE.module


any idea of what am I doing wrong?

Thanks a log.
You need to add inc into your implementation of the function.  Also you don't need to add the extension .inc as part of the filename:

$file_path = module_load_include('inc', 'MYMODULE', 'FILENAME');


Documentation: module_load_include();.