我有一個網站接收一些參數並返回一個電話號碼。帶var參數的PHP file_get_contents失敗
這是呼叫我從其他頁面做:
$phoneNumber= file_get_contents("https://page.company.test/?app=$appid&affiliateid=$affiliatep&laNG=en&country=$countryp&sav=$savactive");
它失敗網址傳遞這樣。我回應了整個網址,並設置了正確的變量。
但是,如果使用的URL這樣的,它的工作原理:
file_get_contents("https://page.company.test/?app=tsc&affiliateid=main&laNG=en&country=au&sav=false");
我怎麼錯過?
你有沒有https(與http)嘗試? (file_get_contents(「http://tfnlicense.safebytes.com/?app=tsc&affiliateid=main&laNG=en&country=au&sav=false」);) – Vigikaran