0
我沒有看到問題在這裏。
PHP解析錯誤:語法錯誤,意外「$捲曲」(T_VARIABLE)
$file = 'https://www.somesite.com/conversion.jpg?id=blahblah&name='.$xmlval['fname'].'&city='.$xmlval['city'].'&state='.$xmlval['regionDisplay'].'&email='.$xmlval['email'].'&message='.($xmlval['rebill'] == 'true' ? 'Renewed ' : 'Purchased ').$spc_licenses.($spc_licenses == 1 ? ' license ' : ' licenses ').' of product!';
if (function_exists('curl_version')) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $file);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($curl);
curl_close($curl);
}
else if (file_get_contents(__FILE__) && ini_get('allow_url_fopen'))
{
$content = file_get_contents($file);
}
else
{
echo 'error'; /* neither available */
}
哪條線你得到這個錯誤,我看不出你的代碼有任何問題。 –
對'$ curl = curl_init();' – user756659
進行龐大該錯誤通常表示在代碼中某處丟失了分號或括號。你有沒有檢查你的代碼的其餘部分? – Clonkex