Is it possible to use flask render_template to a php script Is it possible to use flask render_template to a php script flask flask

Is it possible to use flask render_template to a php script


So if you want process the php in python, you'll need to do something like

data = "Charles"from subprocess import callcall(["php", "my_php_scripts.php", data])

where your php script looks something like

<?php$DataString = $argv[1];echo "Eat nachoes, $DataString!\r\n";

presuming the data is something fairly simple, or maybe you can convert it into a JSON if it's a more complex object and transfer it in that way.