主题: 无法浏览远端图片文件夹内的子文件夹
作者: Jea杨, 发布日期: 2013-03-10 13:53:41, 浏览数: 2883

问题是这样的:在本地测试的时候下图中的201303以及System两个文件夹是可以点开并选择里面的图片的,但是不知道为何,程序上传到到服务器后在kind浏览图片文件时显示是个空文件夹,而这两个文件夹内其实是有图片的(比如这个附图l就是201303这个文件夹里的图片),也就意味着选择不了这个201303文件夹里的图片。到底是怎么回事啊?

难道跟服务器的配置有关系?php无法读取到这个文件夹内的文件信息?附浏览远端图片时firebug的返回字符串 ;虚线内~~~

---------------------

/var/www/public_html/tmp/Uploads/image{"moveup_dir_path":"","current_dir_path":"","current_url":"\/tmp\/Public\/Editor\/php\/..\/..\/..\/Uploads\/image\/","total_count":6,"file_list":[{"is_dir":true,"has_file":false,"filesize":0,"is_photo":false,"filetype":"","filename":"201303","datetime":"2013-03-10 01:44:24"},{"is_dir":true,"has_file":false,"filesize":0,"is_photo":false,"filetype":"","filename":"System","datetime":"2013-03-10 01:10:24"},{"is_dir":false,"has_file":false,"filesize":190895,"dir_path":"","is_photo":true,"filetype":"jpg","filename":"1.jpg","datetime":"2013-03-04 23:27:24"},{"is_dir":false,"has_file":false,"filesize":276083,"dir_path":"","is_photo":true,"filetype":"jpg","filename":"2.jpg","datetime":"2013-03-04 22:43:42"},{"is_dir":false,"has_file":false,"filesize":276535,"dir_path":"","is_photo":true,"filetype":"jpg","filename":"3.jpg","datetime":"2013-03-04 18:22:20"},{"is_dir":false,"has_file":false,"filesize":67729,"dir_path":"","is_photo":true,"filetype":"jpg","filename":"school.jpg","datetime":"2013-03-08 23:00:12"}]}

---------------------


能解答下到底是什么原因导致的吗?

再附我改动了的file_manager_json.php文件中的代码段:

-------------------

$php_path = dirname(__FILE__) . '/';
$php_url = dirname($_SERVER['PHP_SELF']) . '/';
$root_path = $php_path . '../../../Uploads/';
$root_url = $php_url . '../../../Uploads/'; //也就是改动了两处文件目录

-------------------

另外我的目录结构:

/tmp

kind目录:

/tmp/Public/Editor/lang

/tmp/Public/Editor/php    /*此php文件夹内的几个php文件位置未改动*/

/tmp/Public/Editor/plugins

/tmp/Public/Editor/thems

/tmp/Public/Editor/kindeditor-min.js

文件上传目录

/tmp/Uploads

浏览远端图片的

/tmp/Uploads/image

作者: Jea杨, 发布日期: 2013-03-10 19:32:44

囧,还是自己慢慢排除代码给找出来了

是文件file_manager_json.php的

77行:$file_list[$i]['has_file'] = (count(scandir($file)) > 2);这段代码服务器兼容性出现问题,无法判断子文件夹内是否有文件,这个scandir函数在我这台服务器永远返回NULL,坑爹...... 

回复
作者: Jea杨, 发布日期: 2013-03-10 19:36:29
太囧了,php配置中把scandir给禁用了。劳资哟
回复
发表新帖 发表回复