鍍金池/ 問答/PHP  Linux/ 為什麼我在 ubuntu apache 執(zhí)行 php 腳本他會(huì)直接吐腳本給我,沒

為什麼我在 ubuntu apache 執(zhí)行 php 腳本他會(huì)直接吐腳本給我,沒有執(zhí)行?

我在終端機(jī)打 :

sudo php apache/restart.php

他直接吐給我

shell_exec("sudo systemctl restart apache2");
shell_exec("sudo /etc/init.d/apache2 restart");

但是我希望他執(zhí)行php腳本不是show給我看
是還缺什麼套件要安裝嗎??

回答
編輯回答
故林

restart.php貼出來看看,是不是缺<?php ?

2017年9月9日 01:55