I am using php as my front end and grails as my back end. But it ruins my data fetch.
我使用php作为我的前端,grails作为我的后端。但它破坏了我的数据获取。
how can I increase the performance?
我怎样才能提高性能?
the php script is like this /userdata.php
file
php脚本就像这个/userdata.php文件
$uid=$_GET['uid'];
function getData($uid)
{
$dataUrl='http://localhost:8080/profile/user/teacher?id='.$uid;
$json=file_get_contents($dataUrl);
print_r($json);
}
getData($uid);
javascript which calls this php script is
调用这个PHP脚本的javascript是
$.getJSON('userdata.php?uid'+1,function(data){
console.log(data);
});