0

I have a small Python 3.x script with a variable:

a = 10

and want to pass the variable to a PHP script in the same folder. What code is needed to use that variable in PHP?

BluebayX
  • 15
  • 3
  • Pass it as a command line argument when running the PHP script, then use `$argv` in the PHP script to access it. – Barmar May 22 '22 at 22:54
  • Does this answer your question? [passing value from python to php](https://stackoverflow.com/questions/28780729/passing-value-from-python-to-php) – MattDMo May 22 '22 at 23:06
  • No, absolutely not. I tried that before and the only answer I understand there uses urllib2 and that's not part of Python 3.x as far as I understand. – BluebayX May 22 '22 at 23:16
  • Does this work?https://stackoverflow.com/questions/89228/how-do-i-execute-a-program-or-call-a-system-command – Jun Pan May 23 '22 at 03:20

0 Answers0