I just started learning Drupal 7 Module development. In a tutorial I watched, the person said that
"In hook_menu(), if we have a 'file' attribute then the 'file path' is a must and drupal wont work if it is not declared in drupal 7."
But when I read a book, it said that
The 'file_path' is not required in drupal 7 provided that the file is present in the same directory.
As you can see, its a bit confusing. So my questions are
1) Is 'file path' required in Drupal 7 ?
2) When to use 'file path' ?
I've posted a snippet of the hook_menu implementation :
function modulename_menu() {
$items['...'] = array(
....
....
'file' => 'modulename.admin.inc',
'file path' => drupal_get_path('module','modulename'),
);
return $items;
}
Note : Assume that the file is present in the same modules folder