当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·在jsp页面中如何实现表格浮动    »显示摘要«
    摘要: 怎样能够使下面的表格头在拖动滚动条时始终处于屏幕顶端???? <table> <tr class="rtitle" align="center"> <td rowspan="2" nowrap>序号</td> <td rowspan="2" nowr......
    摘要: 我以前没用过sybase,由于客户方买了原版sybase,才不得以,由于不熟悉,所以我用起来觉得很不方便,比如,我在控制台新建了表,保存后,要修改字段属性就修改不了了,而用sql modeler又无法设置能否为空和外键,用起来非常麻烦,请各位大侠帮小弟一把,先谢了 ......


如何用FSO来删除上传到服务器根目录下的文件

就是用无组件上传附件程序上传的附件,保存在了服务器的根目录下,要怎样用FSO来删除呢?

NO.1   作者: cqfeng

1.   权限问题  
  2.   找到文件  
  3.   删除  
   
  创建一个FileSystemObject的事例  
  Set   MyFileObject=Server.CreateObject(“Scripting.FileSystemObject”)  
  ‘创建一个要进行操作的文件  
  Set   MyFile=MyFileObject.CreateTextFile(“c:\test.txt”)  
  MyFile.WriteLine(“Hello”)  
  MyFile.Close  
  ‘复制文件操作  
  MyFileObject.CopyFile   “c:\test.txt”   “c:\test2.txt”  
  ‘移动文件操作  
  MyFileObject.MoveFile   “c:\test.txt”   “c:\test3.txt”  
  ‘删除这些文件  
  MyFileObject.DeleteFile   “c:\test.txt”  
  MyFileObject.DeleteFile   “c:\test3.txt”  
  %>  
   
 

NO.2   作者: mygoodbuy

<%  
  folderspec="c:\upload"  
  Set   fso   =   CreateObject("Scripting.FileSystemObject")  
  Set   f   =   fso.GetFolder(folderspec)  
  Set   fc   =   f.Files  
  循环列出所有文件名,与数据库中保存的数据做比较  
  For   Each   fd   in   fc  
  sql="select   id   from   tablename   where   filenum="&fd.name&""  
  rs.open   sql,cn,1,1  
  if   rs.eof   then  
  fso.DeleteFile("c:\upload\"&fd.name)  
  end   if  
  rs.close  
  next  
   
  %>  
 


 ·请进来看看    »显示摘要«
    摘要: 有个奇怪的现像:直接打开一个.htm文件时,里面的document.myobj可以用。 但是当是通过http://来打开时,document.myobj就不好用了。怎样回事!!! 请指教。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE