Answer the question
In order to leave comments, you need to log in
How to remove the line break character?
Hello.
I do:
$command_script = "create_first_file.sh $this->server_user_name $id_app index$type_ex_file";
ssh2_exec($connection, "echo pass | sudo -S /bin/bash /opt/scripts/$command_script")
#!/bin/bash
#Create file
mkdir /opt/jails/$1/home/$1/$2
chown $1:$1 /opt/jails/$1/home/$1/$2
touch /opt/jails/$1/home/$1/$2/$3
chown $1:$1 /opt/jails/$1/home/$1/$2/$3
<input id="id_app" name="id_app" value="<?= $data->id; ?>" hidden>
Answer the question
In order to leave comments, you need to log in
Pass through trim .
$command_script = "create_first_file.sh $this->server_user_name " .
trim($id_app) . " index$type_ex_file";
$data->id
). By the way, the semicolon is superfluous there, enough: <?=$data->id?>
. $id_app
. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question