2015-06-25 82 views
-2

我想執行使用PHP的外殼命令。 如何執行註釋中列出的那些命令如何通過PHP執行外殼的逗號

+0

CD 「filelocation」 和節點名 –

+0

你試過執行shell命令標準的PHP函數?結果是什麼? – axxis

+0

我是否正確地想要在你的php代碼中執行'php'?例如'php somephp.php' – Ali

回答

0

取決於您的web服務器配置。我使用phpseclib通過php執行shell命令,但根據您的需要,簡單的shell_exec()就足夠了。

0

shell_exec("script.sh");

For more Informations

+0

在shell_exec中能夠打開file.but但不能執行行節點樣本js.how做shell-exec('node sample'); shell exec ('cd filepath'); –