$_POST值取不到

这是我的代码(this is my code):

<?php $form=$this->beginWidget(‘CActiveForm’, array(

					'id'=&gt;'file-form',


					'htmlOptions'=&gt;array('enctype'=&gt;'multipart/form-data'),//上传文件必须的


					'enableAjaxValidation'=&gt;false,





					)); ?&gt;

<?php echo CHtml::activeHiddenField($model,‘is_image’,array(‘name’=>‘is_image’,‘value’=>‘1’)) ?>

					 &lt;?php echo CHtml::activeFileField(&#036;model,'pic_name'); ?&gt;


                     


                     &lt;?php echo CHtml::submitButton('上传形象照',array('class'=&gt;'save_btn','style'=&gt;'margin-left:40px')); ?&gt;


                     


              


                  &lt;?php &#036;this-&gt;endWidget(); ?&gt;

1:how can i get the local absolute path of the photo uploaded in the controller ?

我怎么在控制器里面取到本地上传图片的路径(绝对路径)呢? (answered)

2: why i can’t get value through $_POST[‘is_image’] in the controller?

我在controller里面 使用&#036;_POST['is_image']怎么得不到值呢?

any help be appreciated!!!

Take a look here

thank you ,but i am a little puzzled,it is not the answer i need

Believe me: you need it.

From what you posted, you have a form… Where is the rest of your code? :)

Your controller action need to handle the uploaded file.

One of the tasks it needs to to is to actually save the file.

Get the absolute path from your controller.