Home >Backend Development >PHP Tutorial >关于yii框架中的actions解决办法

关于yii框架中的actions解决办法

WBOY
WBOYOriginal
2016-06-13 12:05:051033browse

关于yii框架中的actions

本帖最后由 xuzuning 于 2014-08-20 16:20:28 编辑
public function actionCaptcha(){<br />		return array(<br />				'class'=>'system.web.widgets.captcha.CCaptchaAction',<br />				'height'=>20,<br />				'width'=>20,<br />				'maxLength'=>4,<br />				'minLength'=>4	<br />		);<br />	}

	public function actions(){<br />		return array(<br />			'captcha'=>array(<br />				'class'=>'system.web.widgets.captcha.CCaptchaAction',<br />				'height'=>25,<br />				'width'=>80,<br />				'maxLength'=>4,<br />				'minLength'=>4<br />			),<br />		);<br />	}<br />

我觉得都是调用验证码类啊。为什么第一个不能用,第2个能用呢
------解决方案--------------------
怎么无关?
第二段不是有键 captcha (验证码)吗?
而第一段有谁能知道返回的数据的归属呢?
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn