the correct syntax of copy dos command in a php script using shell_exec

i have a problem with the execution of copy dos command in a php script using shell_exec. So i have four variables like this:

$app=“myfolder”;
$path3="…/…/$app/certificats/apns-dev-cert.pem";
$path5="…/…/$app/certificats/apns-dev-key-noenc.pem";
$path6="…/…/$app/certificats/apns-dev.pem";

And when i execute:

$file=“copy $path5+$path3 $path6”;
$output = shell_exec($file);

I got command syntax error and the file result is not generated.

Can you help me please how should be the correct syntax of copy,because i have googled and tested many way but with no result !

My OS is Windows-XP.

Thanks you so much!

I think your DOS command is wrong.

your code outputs this as the copy command

copy …/…/myfolder/certificats/apns-dev-key-noenc.pem+…/…/myfolder/certificats/apns-dev-cert.pem …/…/myfolder/certificats/apns-dev.pem

However, according to this site http://www.easydos.com/copy.html

You need drive information on the destination file

copy test1.doc+test2.doc b:test3

your missing that.

Sponsor our Newsletter | Privacy Policy | Terms of Service