chao anh, em bi loi access denied

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
phuoctan's picture
Event type: 
Training (free or commercial)

chào anh, em đang tìm hiểu drupal, em viết module mà mỗi khi chạy là báo lỗi access denied nên không hiện nội dung module ra, mà vẫn chưa tìm được cách khắc phục, mong anh giúp em.. em đang sử dụng ver 6.12
==> sau đây là code:
=>nếu thấy tiện anh có thể chỉ dẫn hoặc liện hiện với em qua mail: phuoctan1303@gmail.com , cám ơn anh trước

<?php
function mymenu_menu()
{
 
$items=array();
   
/////////////////////

  
$items['mymenu']=array(
         
'title'=>t('Getting'),
         
'path'=>'mymenu',
          
'callback'=>'mymenu_hello',
        
'access'=>TRUE
           
);
/<
em>
    
$timestamp=format_date(time(),'small');
     
$items[]=array(
           
'title'=>t('Stock Quote at @time',array('@time'=>$timestamp)),
        
'path'=>'stockquote',
          
'callback'=>'memu_stock_quote',
        
'access'=>TRUE
           
);
</
em>/
           return
$items;    
}
/////////////////////////////////////
function mymenu_hello($name=NULL)
{
if(!isset(
$name))
{
     
$name=t('good luky');
    }
  return
t('hello @name!',array('@name'=>$name));
}
?>

=================
em xin bổ sung thêm hình ảnh, để tiện quan sát, nhưng mà có thể truy xuất trong content, em cũng không biết lỗi gi, code có vấn đề gi không nữa...T.T

AttachmentSize
ScreenHunter_02 Jul. 11 23.42.gif41.31 KB
ScreenHunter_01 Jul. 11 23.39.gif25.4 KB

Comments

Ối, đăng bài qua group

thehong's picture

Ối, đăng bài qua group nào vậy?

Đề nghị bạn xem lại cách viết hook_menu ở đây. (không có key access, callback, ... mà chỉ có access callback, access arguments, page callback, page arguments, ... giá trị của key title không cần đưa vào hàm t()).

Thế Hồng

cám ơn anh đã hướng dẫn

phuoctan's picture

cám ơn anh đã hướng dẫn
= Nhưng anh có thể cụ thể hơn xíu nữa không? tại em đang bắt đầu nghiêng cứu drupal cung như mô hình về loại framework này
cám ơn anh nhiều lắm

Anh ấy không nói cụ thể

chuvanduyhn91's picture

Anh ấy không nói cụ thể thì sao hiểu rõ được nhỉ? Cần lắm một lời giải đáp câu hỏi như bạn

Download free game & app for Android on website http://apkfly.com

Drupal & SAP Business One

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week