我需要一個幫助。我在使用PHP調用一個API時出錯。使用PHP調用一個sendOTP API時發生錯誤
Error:
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /opt/lampp/htdocs/test/otp.php on line 8
Warning: include(http://api.msg91.com/api/sendotp.php?authkey="15529*************"&mobile="9937229853"&message="Your verification code is:1111"&sender="Subhrajyoti"&otp="1111"): failed to open stream: no suitable wrapper could be found in /opt/lampp/htdocs/test/otp.php on line 8
Warning: include(): Failed opening 'http://api.msg91.com/api/sendotp.php?authkey="15529*************"&mobile="9937229853"&message="Your verification code is:1111"&sender="Subhrajyoti"&otp="1111"' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/test/otp.php on line 8
我下面解釋我的代碼。
$authkey="15529*************";
$mobile=9937229853;
$code=1111;
$message="Your verification code is:".$code;
$sender="Subhrajyoti";
$otp=1111;
include ('http://api.msg91.com/api/sendotp.php?authkey="'.$authkey.'"&mobile="'.$mobile.'"&message="'.$message.'"&sender="'.$sender.'"&otp="'.$otp.'"');
這裏我試圖發送OTP,但得到這些消息。在這裏,我需要發送OTP並獲得響應。請幫幫我。
我不明白爲什麼這包括可以使用捲曲 – lalithkumar
這'url'是隻送了OTP API。 – satya