我正在尝试实现 Php-form-builder 类,但我得到了
Fatal error: Class 'Form' not found in C:\wamp\www\project\admin\newpost.php on line 18
我正在使用 php 5.4.3 运行 apache 2.4.2,请任何有想法的人知道如何让它运行?
<?php
session_start();
error_reporting(E_ALL);
include("../PFBC/Form.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="style/index.css" />
</head>
<body>
<?php
$form = new Form("layout_grid", 500);
$form->configure(array(
"view" => new View_Grid(array(2, 1, 3))
));
$form->addElement(new Element_Hidden("form", "layout_grid"));
$form->addElement(new Element_Textbox("Title:", "Title"));
$form->addElement(new Element_Textbox("First Name:", "FirstName"));
$form->addElement(new Element_Textbox("Last Name:", "LastName"));
$form->addElement(new Element_Textbox("City:", "City"));
$form->addElement(new Element_State("State:", "State"));
$form->addElement(new Element_Textbox("Zip Code:", "ZipCode"));
$form->addElement(new Element_Button);
$form->render();
?>
</body>
</html
>