我正在运行以下代码并收到此错误:
错误的请求
您的浏览器发送了此服务器无法理解的请求.
此外,尝试使用ErrorDocument处理请求时遇到400错误请求错误.
<?php
$phone = "1236547895";
$message = 'Dear '.$firstname.' '.$lastname.',
Your invoice (#'.$invoiceid.') is successfully paid on '.$datepaid.' at Hostomy. Thank you for choosing us.
Regards,
Hostomy
';
$url = "https://www.example.com/file.php?phone=".$phone."&message=".$message."";
$ch = curl_init();
$timeout = 10;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
?>
Run Code Online (Sandbox Code Playgroud)