I want to check the o/p of the shell_exec() after copying a file in linux
$cmd = 'cp -p /var/mangalsutrabandhan.com/123.mangalsutrabandhan_file.com /var/lovetomarry.com/test/ ';
echo $retval = shell_exec($cmd);
But its not copying the files if echo the same code and run it directly it works properly
1> copy file from one dir to other maintaining its property of time and user (i.e cp -p)
2>secondly i want to know the success and failure of the copy code.
its linux, php