Python Forum
How to run php in a python file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run php in a python file
#1
i have a problem i am currently creating a website with php and i have a pyhton program that i want to run on my website i tried using the php function include but that just printed all of the code instead of the output of the code.
~~ UwU
Reply
#2
Please post your code
Reply
#3
Have you tried using the php execute?
https://www.php.net/manual/en/function.exec.php
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#4
Why? Is there a reason you're not just writing the web app in Python?
Reply
#5
What kind of webserver are you using? You will have to configure CGI (Common Gateway Interface) to make your webserver understand it has to execute code and return the result to the browser. Perhaps there are other ways then CGI, I am not sure of that.
Reply
#6
(Mar-05-2020, 10:53 PM)menator01 Wrote: Have you tried using the php execute?
https://www.php.net/manual/en/function.exec.php

no i havent yet i could try that though
~~ UwU
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020