access folder files outside protected folder

i have yii structure like

css

images

payment

[indent] m2t[/indent]


[indent][indent]dmdpaiement.php[/indent][/indent]


[indent][indent] mtc[/indent][/indent]


[indent][indent]cm[/indent] [/indent]

protected

[indent] controllers[/indent]

[indent]models[/indent]


[indent]views[/indent]


   [indent][indent]payment[/indent][/indent]


      [indent][indent]methods.php[/indent][/indent]


.htaccess 

i have used dialog to open dmdpaiement.php (which is outside protected folder) from methods.php

it is displayng error 404 file not found.

how can i access files outside the protected folder and insert to table the attributes in dmdpaiement.php .

what things i need to set?

Assuming dmdpaiement.php contains a class DmdPaiement, have you imported it before you first call it?


Yii::import('webroot.payment.m2t.DmdPaiement');

How about moving payment directory from webroot into protected and make e.g. module?

What is in .htaccess in webroot?

Please provide some code to further analyze…

dmdpaiement.php is simple php file.

how can i create class as DmdPaiement and where should i create this class??

can you plz give me the full example to access files/database outside protected folder with all necessary files and code ??

HERE my sample code:

i have folder payent outside protected

like

js

images

payment

[indent]->m2t[/indent]


    [indent][indent]->dmdpayment.php[/indent][/indent]


    [indent][indent]->updatepayment.php[/indent][/indent]


[indent]->mtc[/indent]


     [indent][indent]->tt.php[/indent][/indent]


     [indent][indent]->updatepayment.php[/indent][/indent]

protected

[indent]->views[/indent]


[indent]->controllers[/indent]


[indent]->models[/indent]


[indent]->....[/indent]

here in m2t->updatepayment.php i want to update table say transection_tbl from data inside this file.

I have no idea how to access database or parametes defined in protected/config/main.php file in m2t->updatepayment.php.

If you have any idea plz explain with some sample code.

Thanks in advance.