php readdir 为什么在本机上能读出目录,在服务器上就不行,为什么,跟php.ini设置有关吗线上等候 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $directory = 'c:/';$d = opendir($directory);while (false !== ($file = readdir($d))) { if(is_dir($directory.$file)) { if($file == '..') { $path = back($directory,2); $c[] = '<li style="line-height:20px; height:20px;padding:0px;margin-top:10px;"><strong><a href="?type=dir&directory='.$path.'"><img src="back.gif" style="margin:-4px 5px;border:0px;" />Parent Directory</a></strong></li>'; }elseif($file == '.') { $path = back($directory,1); $c[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;border-bottom:2px #171717 solid;"><span style="float:right">Last modified Size </span><strong>Index of '.$path.'</strong></li>'; }else { $c[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;"><span style="float:right">'.date ("Y-m-d H:i:s", filemtime($directory.$file)).'</span><a href="?type=dir&directory='.$directory.'&name='.$file.'"><img src="folder.gif" style="margin:-4px 5px;border:0px;" />'.$file.'</a></li>'; } }else { $f[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;"><span style="float:right">'.date ("Y-m-d H:i:s", filemtime($directory.$file)).' '.convert(filesize($directory.$file)).'</span><a style="margin-left:26px;" href="?type=file&directory='.$directory.'&name='.$file.'&act=view">'.$file.'</a></li>'; } } readdir()读取的时候 赋给最在权限 请教一个获取远程图片的问题 php通过input修改数据库记录的问题 php 调出数据库大量数据过慢的问题 如何实现上传与提交数据同时进行 怎么preg_match_all也不能连续匹配了啊?? 偶没分了,问一下关于文本数据库搜索的问题.. 技術請教;可行就給分,決不食言 qq有没有信息发送的接口,大家有没有知道的 怎样实现和最优列车时刻查询呢? ThinkPHP_表单提交问题 数组处理 ,高手帮下忙 如何用最快最有效率的方法筛选掉重复数据。
$directory = 'c:/';
$d = opendir($directory);
while (false !== ($file = readdir($d))) {
if(is_dir($directory.$file)) {
if($file == '..') {
$path = back($directory,2);
$c[] = '<li style="line-height:20px; height:20px;padding:0px;margin-top:10px;"><strong><a href="?type=dir&directory='.$path.'"><img src="back.gif" style="margin:-4px 5px;border:0px;" />Parent Directory</a></strong></li>';
}elseif($file == '.') {
$path = back($directory,1);
$c[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;border-bottom:2px #171717 solid;"><span style="float:right">Last modified Size </span><strong>Index of '.$path.'</strong></li>';
}else {
$c[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;"><span style="float:right">'.date ("Y-m-d H:i:s", filemtime($directory.$file)).'</span><a href="?type=dir&directory='.$directory.'&name='.$file.'"><img src="folder.gif" style="margin:-4px 5px;border:0px;" />'.$file.'</a></li>';
}
}else {
$f[] = '<li style="line-height:20px; height:20px;padding:0px; margin:0px;"><span style="float:right">'.date ("Y-m-d H:i:s", filemtime($directory.$file))
.' '.convert(filesize($directory.$file)).'</span><a style="margin-left:26px;" href="?type=file&directory='.$directory.'&name='.$file.'&act=view">'.$file.'</a></li>';
}
}