程序是访问网上邻居目录
运行程序的2003和xp都有权限访问192.168.2.198
但是2003运行后打印出来的是null,xp可以正常列出文件夹下面的文件名称.不知道为何?程序如下: <%
String videopath=null,companyid=null ;
videopath ="\\\\192.168.2.198\\Mambors";
File fl = new File( videopath );
File lst[] = fl.listFiles();
if ( lst== null ){
out.print ( "null" ) ;
}else{
for ( int i= 0;i<lst.length;i++){
companyid= lst[i].getName();
out.print( "companyid:"+ companyid );
out.print ( "<br>" ) ;
}
}
%>
运行程序的2003和xp都有权限访问192.168.2.198
但是2003运行后打印出来的是null,xp可以正常列出文件夹下面的文件名称.不知道为何?程序如下: <%
String videopath=null,companyid=null ;
videopath ="\\\\192.168.2.198\\Mambors";
File fl = new File( videopath );
File lst[] = fl.listFiles();
if ( lst== null ){
out.print ( "null" ) ;
}else{
for ( int i= 0;i<lst.length;i++){
companyid= lst[i].getName();
out.print( "companyid:"+ companyid );
out.print ( "<br>" ) ;
}
}
%>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货