19 lines
394 B
PHP
19 lines
394 B
PHP
<?php
|
|
|
|
class Test_api extends MY_Controller {
|
|
function get_param() {
|
|
$body = file_get_contents("php://input");
|
|
return json_decode($body,true);
|
|
}
|
|
function index() {
|
|
//print param
|
|
//pritn headers
|
|
echo "post : ";
|
|
print_r($_POST);
|
|
echo "param: ";
|
|
print_r($this->get_param());
|
|
echo "header : ";
|
|
print_r(getallheaders());
|
|
}
|
|
}
|