Home  >  Article  >  Backend Development  >  php 执行python 脚本文件解决方案

php 执行python 脚本文件解决方案

WBOY
WBOYOriginal
2016-06-13 12:26:111115browse

php 执行python 脚本文件
我这有这么一个php文件:
system('python /home/yangxu/test/providerinfo/smx_sensor.py bl460c-g8-2.test');
echo 'success';
//end php 
?>

如果在命令行执行php temperatureProvider.php,里面的python脚本可以执行;
可是我通过网页运行这个php文件的时候,只输出了‘success’,python脚本没有执行,这个是怎么回事呢,有什么解决办法吗,谢谢高手指教!
------解决思路----------------------
执行PYTHON的文件路径 及URL格式都需要检查
------解决思路----------------------
bl460c-g8-2.test这个打成全路径试试~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn