我已經得到了這個菜單鉤子,我通過它向函數發送兩個參數。如何獲取通過drupal發送的多個參數hook_menu
但是在函數中我只接收第一個參數。
是否有人知道如何使用Drupal菜單系統發送和獲取多個參數?
function drupal_menu(){
$items = array();
$items['drupal/%/%'] = array(
'title' => t('Welcome to the Hello World Module'),
'page callback' => 'drupal_page',
'page arguments' => array(1,2),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function drupal_page($arg1, $arg2) {
return drupal_json(array('mess1'=>$arg1,'mess2'=>$arg2));
}
我有同樣的問題:清空緩存後,它的工作。 – Parthi04