开发者

Validations for Zend-form using ini file

开发者 https://www.devze.com 2023-02-15 17:47 出处:网络
$aElements[]= new Zend_开发者_JAVA百科Form_Element_Text(new Zend_Config_Ini(\'../application/adxsearch/modules/admin/views/config/adminvalidate.ini\', \'user_email\'));
$aElements[]= new Zend_开发者_JAVA百科Form_Element_Text(new Zend_Config_Ini('../application/adxsearch/modules/admin/views/config/adminvalidate.ini', 'user_email'));

And adminvalidate.ini

[user_email]
name = "user_email"
value = ""
attribs.id = "user_email"
validators.regexp.validator = "Regex"
validators.regexp.options.regex = "/^[\d]{0,20}$/"

when i run the application i am getting this error..

Message: parse_ini_file(../application/adxsearch/modules/admin/views/config/adminvalidate.ini) [function.parse-ini-file]: failed to open stream: No such file or directory

Please help me..

reagrds kiran


Do you have a correct running dir? Seems, that Zend trys to open file while staying in different dir.

All paths given in form of "../path" are relative to current working directory, not to the directory of UserForm.php file.

0

精彩评论

暂无评论...
验证码 换一张
取 消