Install the package in the terminal by shell_exec

59 Views Asked by At

I need to install a package from github in the php exec shell function. But in the installation phase, it asks me for 4 answers. username password port y/n I want to enter the answers in order in the continuation of the installation with shell exec. But I don't know how.

Does not work :

enter image description here

<?php

 $cmd = 'bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) -y -admin -admin -2053';
echo shell_exec($cmd);

0

There are 0 best solutions below