PHP executes Python script file

Source: Internet
Author: User
I have a php file like this:
System (' python/home/yangxu/test/providerinfo/smx_sensor.py bl460c-g8-2.test ');
echo ' success ';
End PHP
?>

If PHP temperatureprovider.php is executed at the command line, the Python script inside can execute;
But I run this php file through the Web page, only output the ' success ', Python script does not execute, this is how to do, what solution, thank you master advice!


Reply to discussion (solution)

The file path and URL format for executing python need to be checked

Bl460c-g8-2.test this dozen perfect path to try ~

The file path and URL format for executing python need to be checked


I have changed the path:
System ('/usr/bin/python/home/yangxu/test/providerinfo/smx_sensor.py bl460c-g8-2.test ');
But there is still no response, what will be the problem?

Did you solve the problem??? I also met the same problem with you!!!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.