Problem With Yii::import()

Hi all:

I’m using xupload extension to upload files ;

I want to save file infomation to db. Such as upload_user,upload_date

I created a model named ‘Attatchment’ in protected/models folder.

Then in the extension ’ protected/extensions/xupload/actions/XUploadAction.php’,I wrote this:

public function saveAttatchmentModel()


	Yii::import('application.models.Attatchment');// this line throw exception :include(Attacthment.php) : failed to open stream: No such file or directory (E:\xampp\apache\htdocs\framework\YiiBase.php:423)

	$att = new Attacthment();

	echo $att;


How can i solve this problem? Many thanks!!

Notice that it’s spelt Attachment, you have an extra ‘t’.

Also, it’s this line that throws the error because you’ve spelt the word wrong in a different way (the ‘t’ has moved):

$att = new Attacthment();

Hi Keith : thanks for your reply!

It’s a really low level mistake. I changed the code. It’s works fine .

Thanks again!