代码如下:
$upload = new upload();
$info = $upload->upload();
if($info){
$updoc0 = __ROOT__ . '/' . $info[0]['path'];
$updoc1 = __ROOT__ . '/' . $info[1]['path'];
$updoc2 = __ROOT__ . '/' . $info[2]['path'];
$updoc3 = __ROOT__ . '/' . $info[3]['path'];
}
$data = array(
'wid' => $this->_POST('wid', 'intval'),
'title' => $this->_POST('Title'),
'file0' => isset($updoc0) ? $updoc0 : '',
'file1' => isset($updoc1) ? $updoc1 : '',
'file2' => isset($updoc2) ? $updoc2 : '',
'file3' => isset($updoc3) ? $updoc3 : '',
'uid' => $_SESSION['uid'],
'time' => time(),
);
p($data);die;表单:<input name="updoc0" type="file" />
<input name="updoc1" type="file" />
<input name="updoc2" type="file" />
<input name="updoc3" type="file" />错误代码:
最佳答案