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

WBOY
Release: 2016-06-13 12:26:11
Original
1139 people have browsed it

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这个打成全路径试试~

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template