I am new to drupal, I have created a Drupal 7 module in sites/all/modules/edm
edm.info
name = edm
description = EDM Registration Module
package = EDM API
version = 1.0
core = 7.x
files[] = 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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.