vps交流

[疑问] 这一段Curl命令放到php里头该怎么写?


下面这段Curl是在命令行执行的格式,请问放到PHP里头该怎么写呢?

  1. curl ‘https://api.twilio.com/2010-04-01/Accounts/[AccountID]/Messages.json’ -X POST –data-urlencode ‘To=+86[Number]’ –data-urlencode ‘MessagingServiceSid=[ServiceID]’ –data-urlencode ‘Body=123456是您的验证码’ -u [AccountID]:[AuthToken]

复制代码

exec("curl ‘https://api.twilio.com/2010-04-01/Accounts/[AccountID]/Messages.json’ -X POST –data-urlencode ‘To=+86[Number]’ –data-urlencode ‘MessagingServiceSid=[ServiceID]’ –data-urlencode ‘Body=123456是您的验证码’ -u [AccountID]:[AuthToken]");
奇怪,怎么回复不了

哦能回复了,看来是那段代码不让发

konololi 发表于 2022-2-1 22:41
奇怪,怎么回复不了

哦能回复了,看来是那段代码不让发

剪切板 https://cl1p.net/

大概这样
https://cl1p.net/uqzsfrdqccaxo
用exec函数