Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- //===========extend core REST=========
- require_once APPPATH . '/libraries/REST_Controller.php';
- date_default_timezone_set('Asia/Jakarta');
- class Core extends REST_Controller {
- function __construct() {
- parent::__construct();
- header('Access-Control-Allow-Origin: *');
- }
- function index_post(){
- $this->test();
- }
- function index_get(){
- $this->test();
- }
- private function test() {
- $respon['raw'] = array();
- $params = $this->post();
- $respon['raw']['libs'] = $params;
- $respon['raw']['apache'] = $_POST;
- $respon['raw']['get'] = $_GET;
- $respon['raw']['request'] = $_REQUEST;
- $respon['raw']['server'] = $_SERVER;
- $this->result($respon);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement