1 回答

TA貢獻(xiàn)1852條經(jīng)驗(yàn) 獲得超7個(gè)贊
您正在使用GET方法而不是傳遞 url 中的參數(shù)POST,因此您需要:
<?php
require_once 'db_functions.php';
$db = new DB_Functions();
$response = array();
$phone="1234";
$name="Test";
$birthdate="1994-01-01";
$address="123 M";
if(isset($_GET['phone']) &&
isset($_GET['name']) &&
isset($_GET['birthdate']) &&
isset($_GET['address']))
{
echo "Hello World 1";
$phone = $_GET['phone'];
$name = $_GET['name'];
$birthdate = $_GET['birthdate'];
$address = $_GET['address'];
echo "Hello World 2";
}
else{
echo "Hello";
$response["error_msg"] = "Required parameter
(phone,name,birthdate,address) is missing!";
echo json_encode($response);
}
?>
- 1 回答
- 0 關(guān)注
- 132 瀏覽
添加回答
舉報(bào)