在我给出的下面的代码中,第二个DIV部分没有执行。其中包含的PHP代码未执行。我添加了一个测试回声,但它也没有显示它。为什么控制没有到达那里。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Add/Update Election Category</title>
<link rel="stylesheet" href="../Lib/entryformstyle.css" type="text/css"/>
</head>
<body>
<div id="sectionEntryForm" class="entryForm" style="width:300px"> <!-- Begin of Entry Form Section -->
<form action="electioncategorymaster.php" method="post" id="frmElectionCategoryMaster" name="frmElectionCategoryMaster">
<table id="tblEntryForm" cols="3" class="entryFormTable">
<tr bgcolor="white">
<td colspan="3" align="center">Add / Update Election Category</td>
</tr>
<tr>
<td>Election category name:</td>
<td colspan="2"><input id="inElectionCategoryName" name="inElectionCategoryName" accept="text/plain" maxlength="80" class="entryFormInputBoxColorCompulsoryField" size="40"></td>
</tr>
<tr>
<td>Total members:</td>
<td colspan="2"><input id="inTotalMembers" name="inTotalMembers" accept="text/plain" maxlength="6" class="entryFormInputBoxColor" size="40"></td>
</tr>
<tr>
<td>Short description:</td>
<td colspan="2"><textarea id="inShortDesc" name="inShortDesc" class="entryFormInputBoxColor" cols="31"></textarea></td>
</tr>
<tr>
<td>Chairman:</td>
<td colspan="2"><input id="inChairman" name="inChairman" accept="text/plain" maxlength="80" class="entryFormInputBoxColor" size="40"></td>
</tr>
<tr>
<td align="center"><input id="btnMenu" name="btnMenu" type="button" value="Return to Menu"></td>
<td align="center"><input id="btnClear" name="btnClear" type="button" value="Clear Entries"></td>
<td align="center"><input id="btnUpdate" name="btnUpdate" type="submit" value="Update Record"></td>
</tr>
</table>
</form>
</div> <!-- End of Entry Form Section -->
<br>
<div id="sectionGrid"> <!-- Begin of Grid Section -->
<table id="tblGrid">
<tr>
<?php
echo "---";
require("../Lib/displaygrid.php");
displaygrid::SetGridWithValues("ecid As ID, ecname As Category","electioncategorymaster");
?>
</tr>
</table>
</div> <!-- End of Grid Section -->
</body>
</html>
答案 0 :(得分:3)
AddHandler x-httpd-php html
定义添加到httpd.conf或.htaccess文件中。您也可以插入代码 文件的开头,以确保你 得到所有错误:
error_reporting(E_ALL);
ini_set('display_errors', 'On');