0
我有一個這樣的PHP腳本。 這不會運行我的腳本,也不會打印任何按鈕上的點擊。如何做到這一點 此外,如果你有一個指針網上PHP的101請讓我知道執行一個PHP來執行shell腳本
<?php
if ($_GET['run']) {
# This code will run if ?run=true is set.
ob_start();
passthru("./check_ddts.sh ".escapeshellarg($_POST["CSCui21515"]));
$data = ob_get_clean();
}
?>
<!-- This link will add ?run=true to your URL, myfilename.php?run=true -->
<button type="button" onclick="?run=true">Click Me!</button>
你在哪裏定義你的函數'passthru()'和'escapeshellarg()'? – Dave
@Dave'passthru()'和'escapeshellarg()'是原生的php函數。 –
真的嗎?每天學些新東西。 – Dave