以下のようにphpからpythonスクリプトを実行しようとしています
exec('python C:/wamp/www/Proj/bin/test_wrapper.py');
それはtest_wrapper.pyを起動しなかったので、test_wrapper.pyの代わりにC++を使用してexeを作成しようとし、以下のようにphpからそのC++ exeを呼び出そうとしました
exec('C:/wamp/www/Proj/bin/LaunchEngine.exe');
再び機能しませんでした.exec()を使用しているときに、非常に基本的なことが欠けていると確信しています.私はpythonとphpの初心者です. 私のphp、python/C++ exeは同じサブディレクトリ(bin)にあります。私を助けてください。参考までに、ここに私の python スクリプト test_wrapper.py import subprocess があります
def main():
script=subprocess.Popen('python proj2xml.py')
script.wait()
script=subprocess.Popen('python cost2xml.py')
script.wait()
launch_fcs_engine=subprocess.Popen('fcs.exe')
launch_fcs_engine.wait()
if __name__ == '__main__':
main()
前もって感謝します