我是cakePHP的新手。谁能帮我一个多文件上传使用HTML5使用蛋糕php的代码。任何帮助都将不胜感激。
这是我到目前为止所知道的:
<tr>
<th>ID</th>
<th>File Name</th>
<th>Size</th>
</tr>
<?php foreach($files as $file): ?>
<tr>
<td>
<?php echo $file['Doc']['id'];?>
</td>
<td>
<?php echo $this->Html->link($file['Doc']['name'], array('controller' => 'files', 'action' => 'uploads', $file['Doc']['name'])); ?>
</td>
<td>
<?php echo number_format($file['Doc']['size']/1023,0).' KB';?>
</td>
</tr>
<?php endforeach;?>
<h1>Add a File</h1>
<?php
echo $this->Form->create('Doc',array('type'=>'file'));
echo $this->Form->file('File');
echo $this->Form->submit('Upload');
echo $this->Form->end();
?>发布于 2012-11-08 07:55:53
你可以使用现有的插件来完成这个任务吗?如果是这样,你想试试这个插件:https://github.com/srs81/CakePHP-AjaxMultiUpload/ -支持多文件上传,AJAX等。
https://stackoverflow.com/questions/13274053
复制相似问题