Here're the steps I did to create an mudule:
- create a directory groupsundersites/all/modules
- in the above directory groups, create two filesgroups.moduleandgroups.info
The content of groups.info:
; $Id: groups.info,v 1.3 2006/11/21 20:55:36 dries Exp $
name开发者_开发问答 = groups
description = Test Groups Listings.
package = "test groups"
version = "5.10"
project = "ed_groups"
datestamp = "1218672307"
The content of groups.module:
<?php
function groups_menu($may_cache)
{
    $items = array();
    $items[] = array(
        'path' => 'test_menu',
        'type' => MENU_CALLBACK,
        'callback' => 'groups_list',
        'title' => t('All Group Listing')
    );
}
function groups_list()
{
    return 'helloworld';
}
I got an oops(404) page when visiting site.com/test_menu
Can you spot what's wrong above?
It looks like your problem is that you don't return $items in your hook_menu.
It should be:
function groups_menu($may_cache) {
    $items = array();
    $items[] = array(
        'path' => 'test_menu',
        'type' => MENU_CALLBACK,
        'callback' => 'groups_list',
        'title' => t('All Group Listing')
    );
    return $items;
}
Remember to clear the cache after you do this, as Drupal caches the menu system.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论