Answer the question
In order to leave comments, you need to log in
How to write shell command to string type using php?
How to write shell command to string type using php? Tried different ways but nothing worked.
$command = "sudo useradd -m -p $(perl -e 'print crypt($ARGV[0], "123321")' 13321 ) ".$_user_server." && tar -xf /home/files/cs.tar -C /home/".$_user_server."/ && chown ".$_user_server." -Rf /home/".$_user_server." && chmod 777 /home/".$_user_server;
Answer the question
In order to leave comments, you need to log in
$command = "sudo useradd -m -p $(perl -e 'print crypt($ARGV[0], \"123321\")' 13321 ) ".$_user_server." && tar -xf /home/files/cs.tar -C /home/".$_user_server."/ && chown ".$_user_server." -Rf /home/".$_user_server." && chmod 777 /home/".$_user_server;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question