-
-
Save hotwebmatter/5365656 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function static_json_menu() { | |
// $items['view/path/that/returns/the/json'] = array( | |
$items['store-locator/json'] = array( | |
'title' => t('JSON Callback'), | |
'page callback' => 'mymod_callback', | |
'access callback' => TRUE, | |
'type' => MENU_CALLBACK, | |
); | |
return $items; | |
} | |
function static_json_callback() { | |
// $json = "/some/file/on/disk.js"; | |
$json = "sites/default/files/google_store_locator/json"; | |
die(file_get_contents($json)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment