Call PHP scripts in Pythonflask Development

Source: Internet
Author: User
For example, how to call a php script in Python. Failed to execute both OS. system and subprocess. call. The corresponding statement is as follows: subprocess. call (& #039; usrbinphprootaddpass. php & #039; + ftp + & #039; & #039; + ftppass) has no error message,... for example, how to call a php script in Python. Failed to execute both OS. system and subprocess. call.
The statement is as follows:

Subprocess. call ('/usr/bin/php/root/addpass. php' + ftp + ''+ ftppass)

There is no error message, but the execution failure can be determined based on the Program Logic.

Reply content:

For example, how to call a php script in Python. Failed to execute both OS. system and subprocess. call.
The statement is as follows:

Subprocess. call ('/usr/bin/php/root/addpass. php' + ftp + ''+ ftppass)

There is no error message, but the execution failure can be determined based on the Program Logic.

The solution is as follows:

Subprocess. call ('/usr/bin/php/root/addpass. php' + ftp + ''+ ftppass, shell = True)

Can I run php/root/addpass. php ftp ftppass directly on the console?
In addition, this is not necessarily the correct method based on the execution content.

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.