2013-08-29 28 views
-2

我想使用cURL上傳文件,但無法弄清楚如何使用$ url數組。 例如:

$urls = array("http://images.domain.com/", 
       "http://flash.domain.com/", 
       "http://other.domain.com/" 
      ); 

     foreach ($urls as $url) { 

我想這一點,但沒有成功:

$upload = "$url ."upload/upload.php"; 

有什麼建議? :) 感謝

+0

'$上傳= 「{$ url}的上傳/ upload.php的」;' – undone

+0

或$上傳= $網址「上傳/ upload.php的」; – MrP

+1

刪除第一個報價:'$ upload = $ url。「upload/upload.php」;' –

回答

1

你需要拿出第一次報價爲它工作

$urls = array("http://images.domain.com/", 
       "http://flash.domain.com/", 
       "http://other.domain.com/" 
      ); 

    foreach ($urls as $url) { 
     $upload = $url ."upload/upload.php"; 
} 
相關問題