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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -