title: Batch File with CURL command not executing correctly in PHP but runs from command line
body: <p>Hi I'm having issues with running a curl command from a batch file. I execute the file from PHP code like this:</p>
  
  <pre><code>exec("curlPut.bat $zipName $url", $output);
  </code></pre>
  
  <p>I change the directory in the PHP code to where the batch file and zip are both located before I run the batch file.</p>
  
  <p>This is the script:</p>
  
  <pre><code>@echo off
  curl -X PUT -H "Content-Type:application/zip" --data-binary @%1 %2
  </code></pre>
  
  <p>However when I check the url the PUT command is meant to be sending the zip file to, the data doesn't exist. </p>
  
  <p>When I run the exact same script in the Windows cmd it works perfectly.</p>
  
  <pre><code>curlPut.bat zipFile.zip http://exampleurl
  </code></pre>
  
  <p>This is using the exact same data that I pass as arguments in my PHP code, can't figure out why the batch file works for one but not the other can anyone help?</p>