why git clone do nothing in my php -


i want execute git clone in php. code below:

<?php     exec('git clone git@github.com:xxx/xxx.git /home/xxx',     $out);     foreach($out $info){        echo $info."</br>";     } ?> 

after execute it, target project is not clone local directory , $info has no data , there no error information.

i try git clone in bash script, , can achieve clone. code below:

#!/bin/sh git clone git@github.com:xxx/xxx.git /home/xxx 

and seemed can use git add in php, why git clone particular cant execute in php file.

edit: think not same how can debug exec() problems? . find can execute php cli, in way git clone achieve task. git clone lazy fpm.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -