2 Replies - 511 Views - Last Post: 16 May 2014 - 08:17 AM Rate Topic: -----

#1 grizrule   User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 88
  • Joined: 29-December 13

Using Python code/files in PHP files

Posted 15 May 2014 - 08:00 PM

Hello fellow users! I didn't know which area to post this in, Python or PHP, but I'm guessing experienced PHP programmers would be more likely to know how to use Python code and or files in PHP files.

My question is simple: How can I run Python code in PHP files? If I can, what are the limitations and or risks to running Python code in PHP files?

I know not to use Python code within PHP tags, that's common sense, but how can I run the code?

Is This A Good Question/Topic? 0
  • +

Replies To: Using Python code/files in PHP files

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4246
  • View blog
  • Posts: 13,461
  • Joined: 08-June 10

Re: Using Python code/files in PHP files

Posted 16 May 2014 - 12:29 AM

out of the blue—you could run the python code (i.e. the whole python programme) via a system call.
Was This Post Helpful? 1
  • +
  • -

#3 D4rkMi   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 3
  • Joined: 15-May 14

Re: Using Python code/files in PHP files

Posted 16 May 2014 - 08:17 AM

As far as i know PiP (Python in PHP) is what you want [link], it's a module installable from PECL. I've tried a couple of examples and works fine, let me know if it work also for you.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1