I am new to Yii and frankly new to Object oriented php also. I am trying to learn this. Just needed some help.
Now i create a New customer table for customer details, here have a country field, I need create a drop-down list of countries.
Here i use this code
<?php echo $form->labelEx($model,'country'); ?>
<?php echo $form->dropDownList($model,'country',Lookup::country()); ?>
<?php echo $form->error($model,'country'); ?>
but the error show on
include(Lookup.php): failed to open stream: No such file or directory
So here how can i create the Lookup.php file
Please if anyone could help me with this…
Do you have a Lookup.php file? If you have autoloading set in your config file set to
'import'=>array(then you can put Lookup.php file in one of those folders. The results of that could be the result of a listData output or could simply be an associative array of ‘value’=>’label’.'application.models.*',
'application.components.*',
),