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