How to include/load LoginForm.php


When i do:

$form = new LoginForm;

I get the error:

YiiBase::include(LoginForm.php) [<a href=‘yiibase.include’>yiibase.include</a>]: failed to open stream: No such file or directory

which is pretty obviously, but how do I solve it? The LoginForm.php file is located in: /framework/cli/views/webapp/protected/models/, should it be moved to /framework/models/?

Thanks :)

does your config file have










what version of yii are you using?

have you modified the framework?

there is no method YiiBase::include

i just reviewed your original post and realised the path you gave. Why are you trying to use LoginForm.php from /framework/cli/views/webapp/protected/models/ ?

you should be using it from APPLICATION_DIRECTORY/protected/models

I’am using version 1.0.9 and I’ve just copy/pasted from the blog demo. But the problem is solved by moving the file to /protected/models/, but why is this file included in the framework?

it’s for the purpose of generating the test application using the yiic tool from cli