python - Variables in PHP String -
so i'm trying execute python function php, reason doesn't work when want add variable.
it works fine when shell this:
python -c 'import smtp; smtp.email("email body")'
but when run php won't work if add variable:
exec("python -c 'import smtp; smtp.email({$email})'");
i'm python right, why won't work? every post see shows variables inserted this.
seems forgot use \" email body.
exec("python -c 'import smtp; smtp.email(\"$email\")'");
Comments
Post a Comment