这就是表单代码:CakePHP的:获取数据阵列的价值形式
<h2>Upload your file from here</h2>
<form method="post" enctype="multipart/form-data" action="<?php echo WEBSITE_PATH; ?>users/enter_text" id="si_upload_form">
<input type="file" name="file" class="home_single_upload">
</form>
创建隐藏字段来显示时间和文件名
<?php
echo $this->Form->hidden('time_val',array('value' => '','id'=>'time_val'));
echo $this->Form->hidden('filename_val',array('value' => '','id'=>'filename_val'));
?>
我怎样才能在检索值隐藏的形式。我希望它设置在一个变量中,并显示它。
'$ _POST ['time_val']' – ElefantPhace
是否可以将其设置为像$ myTime这样的变量? –
是的。只是试试 – ElefantPhace