22
Feb
Step1: Create a new action for your custom php file in the _menu function in the drupal module file, just like following:
$items['my_php_page'] = array(
'title' => 'Custom PHP Page'',
'page callback' => '_my_php_pager',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
'file' => 'my_php_page.inc.php',
);
Step2: Create ‘my_php_page.inc.php file and create an empty function like following:
function _my_php_page(){
}
Step 3: Paste your custom php script just below the _my_php_page function (below the closing curly brace).
clear the cache and browse the new action. Thats all!





Thanks! That is a useful and concise tip for beginner on Drupal like me!!
How can I call a magento page from drupal.For eg:I have created some custom queries and I neeed to call this from inside Drupal.What Should I do?
Thanks