title: Windows PHP cURL upload not POSTing a file
body: <p>I am having a peculiar issue with cURL on XAMPP 5.6.8. Using the below code, I am not able to send a file that does exist at the path specified in <code>$tempPath</code>. I am thinking that the cURL library may be getting confused with my path that starts with <code>c:\</code>.</p>
  
  <p>My file is found here: <code>C:\tempFolder\r_4878.tmp</code></p>
  
  <p>On the linux server, using the exact same code, this does work using <code>/mnt/temp/</code>. Why should there be a difference?</p>
  
  <p>What might be breaking here?</p>
  
  <p><strong>Upload Code</strong></p>
  
  <pre><code>$post = array( 'file_name' =&gt; $reportID, 'file_contents'=&gt;'@'.$tempPath.'' );
  
  $return = true;
  
  # set the url that we need to use to upload to each server
  $url = "http://server.corp/uploadServer.php";
  
  # curl the file to the remote server
  $ch = curl_init( $url );
  curl_setopt( $ch, CURLOPT_POST,             true    );
  curl_setopt( $ch, CURLOPT_HEADER,           false   );
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER,   true    );
  curl_setopt( $ch, CURLOPT_TIMEOUT,          240     );
  curl_setopt( $ch, CURLOPT_POSTFIELDS,       $post   );
  curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json' ));
  
  # get the servers respone and decode the json response
  $result = json_decode( curl_exec( $ch ) );
  
  $t = array( $url, $tempPath, file_exists( $tempPath ), $result-&gt;success, $post, $result );
  
  echo "\r\n".print_r( $t, true )."\r\n\r\n";
  
  curl_close( $ch );
  </code></pre>
  
  <p><strong>Remote Server</strong></p>
  
  <pre><code>$output['file_exists'] = file_exists( $_FILES["file_contents"]["tmp_name"] );
  $output['file_path']   = $fileName.".txt";
  $output['tmp_name']    = $_FILES["file_contents"]["tmp_name"];
  $output['success']  = move_uploaded_file( $_FILES["file_contents"]["tmp_name"], $fileName.".txt" );
  </code></pre>
  
  <p><strong>Response</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; http://server.corp/uploadServer.php
      [1] =&gt; C:\tempFolder\r_4878.tmp
      [2] =&gt; 1
      [3] =&gt; 
      [4] =&gt; Array
          (
              [file_name] =&gt; UnitTest25-felix
              [file_contents] =&gt; @C:\tempFolder\r_4878.tmp
          )
  
      [5] =&gt; stdClass Object
          (
              [file_name] =&gt; UnitTest25-felix
              [file_exists] =&gt; 
              [file_path] =&gt; UnitTest25-felix.txt
              [tmp_name] =&gt; 
              [success] =&gt; 
              [generationTime] =&gt; 9.70363616943E-5
          )
  
  )
  </code></pre>