我有以下捲曲POST請求
$Curl_Session = curl_init($url);
curl_setopt($Curl_Session, CURLOPT_POST, count($post));
curl_setopt($Curl_Session, CURLOPT_POSTFIELDS, "login={$username}&password={$password}");
curl_setopt($Curl_Session, CURLOPT_HTTPHEADER, $headers);
curl_setopt($Curl_Session, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($Curl_Session, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($Curl_Session, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($Curl_Session, CURLOPT_SSL_VERIFYPEER, false);
$request = curl_exec($Curl_Session);
什麼是使用{}意味着什麼?此請求是否容易受到xss(我的意思是登錄名和密碼參數)?
它設置爲應用程序的類型的捲曲請求/ JSON
檢查這個https://stackoverflow.com/questions/2596837/curly-braces-in-string-in-php –
的可能的複製[ PHP中的字符串中的花括號](https://stackoverflow.com/questions/2596837/curly-braces-in-string-in-php) – castis
表示將使用{}內的變量的值。閱讀更多關於:https://stackoverflow.com/questions/2596837/curly-braces-in-string-in-php – BDS