Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP shell_exec cp-r_Php_Linux_Shellexecute_Shell Exec - Fatal编程技术网

PHP shell_exec cp-r

PHP shell_exec cp-r,php,linux,shellexecute,shell-exec,Php,Linux,Shellexecute,Shell Exec,下面的PHP代码在“website.com”文件夹中创建了一个名为“example.com”的文件夹 如何防止它在目标文件夹内创建新文件夹?添加*: $src = "/home/www/example.com/*"; $dest = "/home/www/website.com/"; shell_exec("cp -r $src $dest"); 添加*: $src = "/home/www/example.com/*"; $dest = "/home/www/website.com/"; s

下面的PHP代码在“website.com”文件夹中创建了一个名为“example.com”的文件夹

如何防止它在目标文件夹内创建新文件夹?

添加
*

$src = "/home/www/example.com/*";
$dest = "/home/www/website.com/";
shell_exec("cp -r $src $dest");
添加
*

$src = "/home/www/example.com/*";
$dest = "/home/www/website.com/";
shell_exec("cp -r $src $dest");

真不敢相信我会错过这个。。太多了!真不敢相信我会错过这个。。太多了!