PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #3328

bug with php5's __autoload function

Details

Submitted2005-01-29 21:27 UTC
Fromvtsupermok at gmail dot com
StatusDuplicate
PackageHTML_QuickForm
PHP Version5.0.3
OSwindowXP
Roadmaps(Not assigned)

Comments

[2005-01-29 21:27 UTC] vtsupermok at gmail dot com

Description:
------------
the package of QuickForms seems miss a file call html_quickform_group.php

Reproduce code:
---------------
<?php
function __autoload($class_name)
{
$path=dirname(__FILE__)."\classes\\".$class_name.".php";
require_once($path);
}

require 'HTML/QuickForm.php';
$form = new HTML_QuickForm('catForm', 'post');
$form->addElement('header', 'frmHeader', 'Cat Form');
$form->addElement('text','name','name: ');
$form->addElement('submit','submit','Finish');

$form->addRule('name','Enter your name.', 'required', '', 'client');
if ($form->validate()) {
$form->freeze();
} else {
$form->display();
}?>

Actual result:
--------------
Warning: __autoload(F:\server\htdocs\www\htdocs\classes\html_quickform_group.php) [function.--autoload]: failed to open stream: No such file or directory in F:\server\htdocs\www\htdocs\test2.php on line 5