How to recover data from php terminal?

Asked

Viewed 59 times

3

Example, I have this command following in a php file:

<?php

$imprimir = shell_exec("cd /home/afonso/Documentos/teste; git add arquivo.txt; git commit -m 'testando'; git push -u origin master");

So far everything works fine, only he asks me to put the Bitbucket password in the terminal and I want to "recover" that part, IE, instead of entering the password in the terminal I want him to enter the password on a screen by php page.

1 answer

4


Try this:

echo shell_exec("cd /home/afonso/Documentos/teste; git add arquivo.txt; git commit -m 'testando'; git push -u origin master" 2>&1");

this 2>&1 will capture everything your terminal would show

Browser other questions tagged

You are not signed in. Login or sign up in order to post.