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