开发者

why this code can't work in drupal?

this is my module file.

 function mymenu_menu() {
 $item开发者_如何学C=array();
  $item['welcome'] = array(
   'title' => 'welcome',
  'page callback' => 'mymenu_test',
 'type' => MENU_CALLBACK,
 ); 

   return $item;
  }



  function mymenu_test(){
 $output = 'welcome user!';
 return $output;
 }

when i access example.com/welcome. it show access denied, why?


You should check out this answer : Can someone explain "access arguments" in Drupal? and take a look at hook_menu()

If you want to allow everyone access, you can also use 'access callback' => TRUE

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜