【发布时间】:2014-01-22 13:24:39
【问题描述】:
在控制器中:
public function Attachments(){
$this->layout = null;
$folder = new Folder(WWW_ROOT.'/files/attachments');
$files = $folder->find('.*\.*');
$this->set('files', $files);}
在视图中(附件.ctp):
<?php foreach($files as $file): ?>
<i><?php echo $file; ?></i>
<?php endforeach; ?>
我怎样才能得到大小或分机!?
【问题讨论】: