thinkphp框架开发后台文件管理功能求救
2个回答
推荐于2016-09-03
展开全部
在控制器中 import("ORG.Io.Dir");构建完路径后, $dir = new Dir($path);
$list = $dir->_values;在模板用volist 进行循环输出数组不成功,进行dump($list)为NULL值, 更换为$list = $dir->getIterator();后也不成功,但是进行dump的时候数组数据已经建立,问下这样的数组如何在模板循环输出?? dump数据为以下代码:
object(ArrayObject)#4 (1) { ["storage":"ArrayObject":private] => array(29) { [0] => array(18) { ["filename"] => string(3) "bbb" ["pathname"] => string(15) "F:\wamp\www\bbb" ["owner"] => int(0) ["perms"] => int(16895) ["inode"] => int(0) ["group"] => int(0) ["path"] => string(11) "F:/wamp/www" ["atime"] => int(1313063512) ["ctime"] => int(1312255725) ["size"] => int(0) ["type"] => string(3) "dir" ["ext"] => string(0) "" ["mtime"] => int(1313063512) ["isDir"] => bool(true) ["isFile"] => bool(false) ["isLink"] => bool(false) ["isReadable"] => bool(true) ["isWritable"] => bool(true) } [1] => array(18) { ["filename"] => string(8) "�1�7�1�7�0�5�0�0�1�7�1�7" ["pathname"] => string(20) "F:\wamp\www\�1�7�1�7�0�5�0�0�1�7�1�7" ["owner"] => int(0) ["perms"] => int(16895) ["inode"] => int(0) ["group"] => int(0) ["path"] => string(11) "F:/wamp/www"
$list = $dir->_values;在模板用volist 进行循环输出数组不成功,进行dump($list)为NULL值, 更换为$list = $dir->getIterator();后也不成功,但是进行dump的时候数组数据已经建立,问下这样的数组如何在模板循环输出?? dump数据为以下代码:
object(ArrayObject)#4 (1) { ["storage":"ArrayObject":private] => array(29) { [0] => array(18) { ["filename"] => string(3) "bbb" ["pathname"] => string(15) "F:\wamp\www\bbb" ["owner"] => int(0) ["perms"] => int(16895) ["inode"] => int(0) ["group"] => int(0) ["path"] => string(11) "F:/wamp/www" ["atime"] => int(1313063512) ["ctime"] => int(1312255725) ["size"] => int(0) ["type"] => string(3) "dir" ["ext"] => string(0) "" ["mtime"] => int(1313063512) ["isDir"] => bool(true) ["isFile"] => bool(false) ["isLink"] => bool(false) ["isReadable"] => bool(true) ["isWritable"] => bool(true) } [1] => array(18) { ["filename"] => string(8) "�1�7�1�7�0�5�0�0�1�7�1�7" ["pathname"] => string(20) "F:\wamp\www\�1�7�1�7�0�5�0�0�1�7�1�7" ["owner"] => int(0) ["perms"] => int(16895) ["inode"] => int(0) ["group"] => int(0) ["path"] => string(11) "F:/wamp/www"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询