user2540615
user2540615

Reputation: 37

passing text variable using shell_exec

I try to passing text using shell_exec.

$message="I go to school";

shell_exec("nohup php -q sendmail.php $picture $message");

but I get only the one word of message when I user argv[2]. what the problem?

Upvotes: 0

Views: 298

Answers (1)

nospor
nospor

Reputation: 4220

You must add " for text

shell_exec("nohup php -q sendmail.php $picture \"$message\"");

Upvotes: 4

Related Questions