[英]Drupal Redirecting to home
I am new to drupal, I have created a Drupal 7 module in sites/all/modules/edm 我是drupal的新手,我已经在sites / all / modules / edm中创建了一个Drupal 7模块
edm.info edm.info
name = edm
description = EDM Registration Module
package = EDM API
version = 1.0
core = 7.x
files[] = edm.module
edm.module edm.module
<?php
function edm_menu() {
$items = array();
$items['edm/send'] = array(
'title' => 'EDM Registration Module',
'page callback' => 'perform_curl_request',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function perform_curl_request() {
drupal_add_http_header('Content-Type', 'application/json; utf-8');
echo json_encode(array('result'=>'success','message','Cool! it is working');
}
When i enabled this module for one of the multisite in localhost, works fine. 当我为本地主机中的多站点之一启用此模块时,工作正常。 and i did the same for live website by uploading then enabled it.
我通过上传然后启用它对实时网站进行了相同的操作。 but always redirects to homepage.
但始终会重定向到首页。
the URL i used to access is 我用来访问的URL是
http://xxxxxxxxxx/edm/send
is there some configuration i missed or what may be the reason. 我错过了一些配置还是什么原因。
For now, It works with following url format. 目前,它可以使用以下网址格式。 Hope there is an issue with clean URL.
希望干净的网址有问题。
http://domaninnamexxx.com/?q=edm/send
instead of 代替
http://domaninnamexxx.com/edm/send
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.