Hi all…
I want to ask about How to upload file on local directory
This is my situation :
-
I use Win Xp
-
I have followed
This is My Code in Controller :
public function actionCreate()
{
$model=new StudentA;
if(isset($_POST['StudentA']))
{
$model->attributes=$_POST['StudentA'];
$model->Excel = $_POST['StudentA']['Excel'];
$model->Excel = CUploadedFile::getInstance($model,'Excel');
if($model->save())
{
$model->Excel->saveAs('.\Temporary');
$this->redirect(array('view','id'=>$model->ID));
}
}
$this->render('create',array(
'model'=>$model,
));
}
I still have an error on :
are there any one know about this problem.
Thanks a lot