Book: Drupal 7 Module Development (directions caused weirdness)
質問
I'm reading a book, Drupal 7 Module Development, and I'm hitting some very weird outputs.
I created a folder:
mysite/sites/default/module/first
Inside this folder I created two files.
first.info
;$Id$
name = First
description = A first module
package = Drupal 7 Development
core = 7.x
files[] = first.module
;dependencies[] = autoload
;php = 5.2
first.module
<?php
// $Id$
/**
* @file
* A module exmplifying Drupal coding practices and API's.
*
* This module provides a block that lists all of the
* installed modules. It illustrates coding standards,
* practices, and API use for Drupal 7.
*/
/**
* Implements hook_help().
*/
function first_help($path, $arg) {
if ($path == 'admin/help#first') {
return t('A demonstration module.');
}
}
But when I activate the module, I get the contents of the first.module file spashed across the top of my page? Can someone advise me on what I am doing wrong?
This is my very first module for Drupal.
正しい解決策はありません
所属していません drupal.stackexchange