[英]Executing shell script in different directory using PHP
我在/home/
目錄中有一個shell腳本。 我想通過網頁執行它。 Web服務器位於/var/www/.
我想知道如何使用PHP在首頁中執行Shell腳本?
我正在使用Ubuntu Server。
exec('/path/to/shell/script');
但是,這僅在禁用safe_mode,php具有對此類文件夾和文件的權限或在您的basedir中定義的情況下才有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.