如果我的提交表单为空,我如何签入http帖子? 由于我将其保存为base64,如果提交表单为空,它不会让我发布。
$http.post('http://localhost/codeigniter/index.php/api/key/profile', {
picture: $scope.file.base64
username: $scope.username
})
答案 0 :(得分:0)
if (isset($_POST["picture"]) && !empty($_POST["picture"]))
{
echo "Yes, picture is set";
}
else
{
echo "N0, picture is not set";
}