4,249
社区成员




var uid = '10002';
var a = 'get_users';
jQuery.ajax({
url: "http://localhost:8099/thinkphp111/index.php?s=/Index/index.html",
type: "POST",
data: { uid: uid, a: a },
success: function (jsonResult) {
alert(jsonResult);
},
error: function (e) {
alert(e);
}
});
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends HomeController {
public function aa()
{
$output = array();
$a = $_POST['a'] ? $_POST['a'] : '';
echo $a;
}
public function index(){
$this->aa();
}