Example code:
import subprocess
# if the script don't need output.
subprocess.call("php /path/to/your/script.php")
# if you want output
proc = subprocess.Popen("php /path/to/your/script.php", shell=True, stdout=subprocess.PIPE)
script_response = proc.stdout.read()
More Related Contents:
- What kinds of patterns could I enforce on the code to make it easier to translate to another programming language? [closed]
- Running a Python script from PHP
- Is there a php function like python’s zip?
- Calling Python in PHP
- Whether to use “SET NAMES”
- How to prevent my site page to be loaded via 3rd party site frame of iFrame
- Variable-length lookbehind-assertion alternatives for regular expressions
- How can I generate a screenshot of a webpage using a server-side script?
- executing Python script in PHP and exchanging data between the two
- int((0.1+0.7)*10) = 7 in several languages. How to prevent this?
- Python equivalent of PHP’s compact() and extract()
- python format datetime with “st”, “nd”, “rd”, “th” (english ordinal suffix) like PHP’s “S”
- Decrypting strings in Python that were encrypted with MCRYPT_RIJNDAEL_256 in PHP
- Running python script in Laravel
- How to call a Python Script from PHP?
- Execute Python script from Php
- Unserialize PHP data in python [duplicate]
- Call Python From PHP And Get Return Code
- Having issue with matching rows in the database using PDO
- How can I properly use a PDO object for a parameterized SELECT query
- How to pass variable number of arguments to a PHP function
- How to list all months between two dates
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- How to call codeigniter controller function from view
- Call to undefined function __() error – phpMyAdmin
- Getting a PHP PDO connection from a mysql_connect()?
- Reverse array in php
- “Class XXX is not a valid entity or mapped super class” after moving the class in the filesystem
- Point in Polygon algorithm giving wrong results sometimes [closed]
- “PHP Fatal error: Class ‘HttpRequest’ not found”