Bonjour,
j'ai un probleme avec l'execution d'une commande shell avec php.
je veux copier un repertoire d'un serveur distant vers mon serveur locale (celui où tourne mon script php).
donc je fais:
$Cmd = "scp -r MonLogin@192.168.X.X:/Chemin/Vers/Mon/Repertoire/* /Chemin/De/Destination/;
$output = shell_exec($Cmd);
mais ca ne marche pas...alors que si j passe comme commande un 'ls', bah ca marche...quelqu'un pourrait il m'aider ??
en revanche cette commande marche tres bien si je la lance depuis un terminal...
par avance merci.
Partager