Yii Property “CUploadedFile.maxWidth” is not defined

$uploadedFile=CUploadedFile::getInstance($model,'image1');
$uploadedFile->maxWidth = 400;
$uploadedFile->maxHeight = 300;

I follow the example in here. But I get the error saying that "Property "CUploadedFile.maxWidth" is not defined."

Is it my CUploadFile.php is not updated?

Answers


That pastebin source doesn't tell the whole story since it does not show where maxWidth is defined. CUploadedfile http://www.yiiframework.com/doc/api/1.1/CUploadedFile does not have a property maxWidth.

Instead of using the pastebin how about trying this extension that will do what it appears you are trying to do: http://www.yiiframework.com/extension/euploadedimage/


Need Your Help

How to apply the same Background-image in different desktop devices

css background position background-image background-position

how can i apply the same Backgrond image position for my image in different desktop devices?

Overflow: hidden isn't working consistently

html overflow css

I am working on some buttons. I want to have a rollover state and I have this in an image in a div with overflow:hidden to hide the state that's not active. It works sometimes but sometimes it look...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.