English 中文(简体)
在Zentd Framework 1.11.11中设立上限的问题
原标题:Problems creating a captcha in Zend Framework 1.11.11

How can I create a captcha field when I have created the form using conventional html rather than the addElement() methods of ZF? That might sound stupid, but i m a novice and after 6 hours of straight googling, still no answer.

问题回答

我能够用本法典直接增加一个上限:

<?php 
$form = new Zend_Form();
$captcha = new Zend_Form_Element_Captcha( Captcha , array(
             captcha  => array(
                 captcha  =>  Image ,
                 wordLen  => 6,
                 timeout  => 300,
                 width  => 300,
                 height  => 100,
                 imgUrl  =>  /captcha ,
                 imgDir  => APPLICATION_PATH .  /../public/captcha ,
                 font  => APPLICATION_PATH .      /../public/fonts/LiberationSansRegular.ttf )));
$form->addElement($captcha);
echo $form;//use this line in view script
$this->view->form = $form //use this line in controller
?>

您也可以将同一守则置于你的控制之下,将其交给大家,然后将其称为:

<form>
//form stuff html
<?php echo $this->form->captcha ?>
</form>




相关问题
Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

PHP Framework: Ebay Like Site

I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

Tagging with Zend Framework

I m trying to create the same solutions as below, but using a simple MySQL query (instead of the static version used below where the words/tags are implemented in the code). The name of the MySQL ...

dynamicaly adding textboxes to zend_form

I hope that this is a quick question to answer. I am developing a form using Zend_Form, I have a number of Zend_Dojo_Form_Element_Textboxs to add to this form dynamically. These are added from rows ...

热门标签