English 中文(简体)
在远程服务器上找不到 Zend 自定义验证器
原标题:Zend custom validator not found on remote server

我知道有一些类似的问题,但从那里得到的答案无助于我。

应用程序在本地正常工作, 但如今除了其它问题外, 找不到我所制作的自定义验证器的分类, 尽管有些模型类( 我还没有全部测试过) 有效 。 这似乎不是一个案件敏感性、 类名、 文件名或文件夹名的问题 。

还有其他原因吗?

最佳回答

我一周前就解决了这个问题,这是通往图书馆的路问题。

公共/索引.php:

defined( LIBRARY_PATH ) || define( LIBRARY_PATH , realpath(dirname(__FILE__) .  /../library ));

在申请/Bootsrap.php中,我有类似的东西:

protected function _initAutoload() {

    // configure new autoloader
    $autoloader = new Zend_Application_Module_Autoloader ( array ( namespace  =>   ,  basePath  => LIBRARY_PATH ) );

    // autoload validators definition
    $autoloader->addResourceType (  Validator ,  /validate ,  MyValidate  );
}
问题回答

暂无回答




相关问题
Bind Button.IsEnabled to custom validation with XAML?

I am sorry I didn t know how to title my question any better, you name it if you got a good 1. I have an entity Contact. this person has navigation properties: Address, Phones (A collection of Phone)....

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

Wpf Combobox Limit to List

We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...

Rails 101 | validates_currency?

I ve searched high and low, but I could not find a solution, to what I think seems like a very common task. In a form I want to have a text input that accepts currency strings (i.e. $1,000,000 or ...

CodeIgniter form verification and class

I m using the form validation library and have something like this in the view <p> <label for="NAME">Name <span class="required">*</span></label> <?...

热门标签