Hi I'm having issues with running a curl command from a batch file. I execute the file from PHP code like this:
exec("curlPut.bat $zipName $url", $output);
I change the directory in the PHP code to where the batch file and zip are both located before I run the batch file.
This is the script:
@echo off
curl -X PUT -H "Content-Type:application/zip" --data-binary @%1 %2
However when I check the url the PUT command is meant to be sending the zip file to, the data doesn't exist.
When I run the exact same script in the Windows cmd it works perfectly.
curlPut.bat zipFile.zip http://exampleurl
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?