處理方式
修改 php.ini
precision = 24
或在 code裡
ini_set('precision',24);
ini_set('precision',24);
$im = imagecreatetruecolor($width,$height);
imagealphablending($im,true);
$transparent = imagecolorallocatealpha($im,0,0,0,127);
imagefill($im,0,0,$transparent);
imagesavealpha($im,true);
header("Content-Type: image/png");
imagepng($im);
imagedestroy($im);
if ( $.browser.msie ){
alert('IE跑不快');
}
{
"data": [
{
"name": "Bruce Tseng"
}
]
}
<?php
$query = 'https://api.foursquare.com/v2/venues/search?ll='.$lat.','.$long.'&client_id='.$foursquare_app_id.'&client_secret='.$foursquare_app_secret.'&v='.date('Ymd');
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $query);
$query_res = curl_exec($ch);
curl_close($ch);
$res = json_decode($query_res);
var_dump($res);
?>
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');