我無法理解爲什麼我的php代碼不工作。請看這個小代碼。這個PHP代碼有什麼錯誤
<?php
if (!isset($_POST['Ingest']) && !isset($_POST['Play']) && !isset($_POST['Remove'])) {
?>
<html>
<head>
<title> Welcome to VASE Content Management System </title>
</head>
<body>
<form method="post" action="<? php echo $PHP_SELF;?>">
Ingest <br />
Path to video master file:<input type="text" size="80" maxlength="80" name="FileNameIn"> <br />
Target Object Name:<input type="text" size="80" maxlength="80" name="ObjectNameIn"><br />
Resolution of Master:<input type="text" size="80" maxlength="80" name="ResolutionIn"><br />
Codec of Master:<input type="text" size="80" maxlength="80" name="CodecIn"><br />
<input type="submit" value="Ingest" name="Ingest"><br />
Play <br />
Object Name:<input type="text" size="80" maxlength="80" name="ObjectNamePl"><br />
<input type="submit" value="Play" name="Play"><br />
Remove <br />
Object Name:<input type="text" size="80" maxlength="80" name="ObjectNameRm"><br />
<input type="submit" value="Remove" name="Remove"><br />
</form>
<?php
}
elseif (isset($_POST['Ingest'])) {
echo "hi";
}
elseif (isset($_POST['Play'])) {
echo "play";
}
elseif (isset($_POST['Remove'])) {
echo "remove";
}
?>
純HTML部分,如果複製到單獨的HTML文件,工作正常,但php代碼不起作用。我嘗試了另一個PHP示例代碼,但這很好,所以我的PHP服務器運行正常。我正在使用Ubuntu 11.10。
錯誤:
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
你期待什麼行爲,你看到了什麼?你是否收到任何錯誤消息或警告? – Sampson 2012-01-09 15:16:12
查看錯誤日誌以查看錯誤消息。 – JJJ 2012-01-09 15:16:33
它輸出什麼? – blake305 2012-01-09 15:16:39