<? if(isset($_POST["submit"]))
{
$f_name = $_FILES["filetoupload"]["name"];
$f_tmp = $_FILES["filetoupload"]["tmp_name"];
$store = "uploads/".$f_name;
if(move_uploaded_file($f_tmp,$store))
echo "file uploaded successfully";
echo"<br>";
}
$line = fgets($f_open);
echo $line;
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=";
$furl ="$url"."$line";
echo "$furl";
$ch = curl_init("$furl");
$fp = fopen("example4.txt","w");
curl_setopt($ch, CURLOPT_PROXY, '10.10.80.11:3128');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
echo $json['results'][0]['address_components'][0]['types'][0];
echo $json['results'][0]['address_components'][0]['types'][1];
$data=json_decode($jsondata);
$address=$data->results[0]->address_components;
?>
波夫提到的程序,要上傳的文件中讀取值,並將其發送到URL地址
我試圖從上傳的文件檢索由線值線和連接具有URL檢索值,
但我得到了錯誤的短信..
注意:試圖讓非對象的財產 C:\ XAMPP \ htdocs中\ phpprog \ upload_file_add.php上線50 ...
哪裏是我的錯誤與說明...
u能PLZ讓我們知道哪一行是在文件upload_file_add你的行數50 .PHP? – 2015-02-23 08:06:47
'$ f_open'從哪裏來? – julekgwa 2015-02-23 10:08:16
嘗試下面的代碼 – julekgwa 2015-02-23 12:22:25