零碎知识点

PHP执行外部脚本或程序

$output = shell_exec('python test2.py');

通过shell_exec()函数可以执行外部的py脚本或exe程序,py程序的print结果将保存在$output中。

Python执行外部脚本或程序

import os
os.system('S-Note.exe')
import subprocess
subprocess.call('S-Note.exe')
posted @ 2016-10-09 16:26  宋不争  阅读(207)  评论(0编辑  收藏  举报