我正在尝试将参数从我的角度服务传递到PHP文件
function SearchStudent(studentId) {
return $http.get('app-data/search-student.php',
{params: { studentId: studentId }})
.then(function(response) {
return response.data;
});
}
然后我尝试用我的php文件中的_GET检索该值
$studentId = $_GET['studentId'] . "%";
问题不仅仅是获取ID {“studentId”:“######”}
答案 0 :(得分:0)
您的SearchStudent
函数已在{"studentId":"######"}
参数中收到studentId
,因此您将{ studentId: {studentId: '######' }}
发送到您的PHP文件。