In my web application I have to copy a directory and all its contents to another location.
I want to use shell_exec
function of PHP. But I can't find the command for that.
You can use:
cp -r source dest
Copies source and all contents of source inside dest.
Define "location" more precisely. In any event:
cp -r sourcedir destdir
;scp -r sourcedir user@targetmachine:destdir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With