0

this is my module file.

 function mymenu_menu() {
 $item=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?

Laxman13
  • 5,226
  • 3
  • 23
  • 27
runeveryday
  • 2,751
  • 4
  • 30
  • 44

1 Answers1

1

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

Community
  • 1
  • 1
Laxman13
  • 5,226
  • 3
  • 23
  • 27