文件大小问题 while($file=readdir($handle)) { if ( !eregi("(\.|cgi|php)$",$file) ) {$file = 'asd/asd/$file'; // readdir读出的内容不含路径,而实际上是需要路径的 echo "<tr><td><a href='$file' target=\"_blank\">$file</a></td><td>".filesize($file)."</td></tr>\n";} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?$newspath="asd/asd/";echo "<table border=0><tr><th width=120>文件名</th><th>大小(字节)</th></tr>";$hd=dir($newspath);while($filename=$hd->read()){ if($filename=="."||$filename==".." ) continue; if(!eregi("(\.|cgi|php)$",$filename)) { echo "<tr><td><a href='$newspath.$filename' target=\"_blank\">$filename</a></td><td>".filesize($newspath.$filename)."</td></tr>\n"; }}?> PHP正则分割字符串的一个问题 PHP表单提交到本页面为什么不能识别$_POST[]的值呢? 这代码不懂?请教下 十个数排序求优解? 简单的递归,可怎么也想不明白,求助!!! 何去何从[我的未来在何处] chop和trim得区别 PHP连接SQL SERVER php无法获取GET和POST发送的变量?? 请问simplexml_load_file在服务器上返回false是什么原因呢 mkdir()怎么不能用 PHP调用DLL文件的疑问
$newspath="asd/asd/";
echo "<table border=0><tr><th width=120>文件名</th><th>大小(字节)</th></tr>";
$hd=dir($newspath);
while($filename=$hd->read())
{
if($filename=="."||$filename==".." ) continue;
if(!eregi("(\.|cgi|php)$",$filename))
{
echo "<tr><td><a href='$newspath.$filename' target=\"_blank\">$filename</a></td><td>".filesize($newspath.$filename)."</td></tr>\n";
}
}
?>