pass php page to page callback with hook_menu I'm developing a module where I use hook_menu.

I know that I can pass to 'page callback' a function that return string with HTML/PHP code.

function mymodule_menu(){
    $items = array();

    $items['test'] = array(
        'title' =&gt; 'page test',
        'description' =&gt; 'my test',
        'page callback' =&gt; 'my_page',
        'access arguments' =&gt; array('access content'),
        'type' =&gt; MENU_NORMAL_ITEM,
        'menu_name' =&gt; 'main-menu',
    );

    return $items;
}

function my_page(){
    return '&lt;h1&gt;hello&lt;/h1&gt;';
}


How can I pass a whole PHP/HTML page as an argument to 'page callback' =&gt; '[my_page.php]' instead of creating a string inside my_page() function ?
The value to 'page callback' can only be a function name.

If you must use 'a whole PHP/HTML page' then work around by using the hook_theme.

&lt;?php
function my_example_menu() {
  $items['my/example'] = array(
    'title' =&gt; 'My title',
    'page callback' =&gt; 'my_example_page', /* callback function */
'access arguments' =&gt; array('access content'),
    'type' =&gt; MENU_NORMAL_ITEM,
);

return $items;
}

/**
 * Implements hook_theme
 *
 */
function my_example_theme($existing, $type, $theme, $path) {
  return array(
    'the_html_page' =&gt; array(
    'template' =&gt; 'the-html-page', /* create file with this name + .tpl.php */
  ),
);
}

function my_example_page(){
  return theme('the_html_page');
}
?&gt;


The value of 'template' in hook_theme() is the name of your file. Create the template file with .tpl.php extension and place it in the same directory as your module. You can put any html that you need in the file.