$ variable = $ url + static_page.php

时间:2013-08-29 14:25:47

标签: php curl

我想使用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";

有什么建议吗? :) 感谢

1 个答案:

答案 0 :(得分:1)

您需要取出第一个报价才能正常工作

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

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