title: move_uploaded_file() Unable to move using yii framework
body: <p>i'm trying to upload file with yii framework when this error appears</p>
  
  <blockquote>
    <p>move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpLEdRdu' to '<a href="http://wmtunisia.com/tamtamtravel.tn/upload/2013-05-03entry_3.jpg" rel="nofollow">http://wmtunisia.com/tamtamtravel.tn/upload/2013-05-03entry_3.jpg</a>' </p>
  </blockquote>
  
  <p>and this what i'm doing in controller</p>
  
  <pre><code>public function actionCreate()
  
  {
  
      $model=new Voitures;
  
      if(isset($_POST['Voitures']))
  
      {
          $model-&gt;attributes=$_POST['Voitures'];
          $model-&gt;image=CUploadedFile::getInstance($model,'image');
  
          if($model-&gt;validate())
  
          {
  
              if(!empty($model-&gt;image)){
  
                  $rep = Yii::app()-&gt;params['webroot'].'upload/';
  
  
  
                  $model-&gt;image-&gt;saveAs($rep.date('Y-m-d').$model-&gt;image);
  
  
                  $model-&gt;image=date('Y-m-d').$model-&gt;image;
  
              }
  
              $model-&gt;description= CHtml::encode($_POST['Voitures']['description']);
              $model-&gt;save();
  
              Yii::app()-&gt;user-&gt;setFlash('save',"La voiture a été enregistrée avec succes!");
  
              $this-&gt;redirect(array('admin'));
  
          }
  
      }
  </code></pre>
  
  <p>please can someone help ?</p>