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

 ·问3个简单问题。。。。    »显示摘要«
    摘要: 1 c语言里面,怎么实现 摄市度 转 华市度 ??? 2 在tc里,怎么实现 程序一运行出现一个界面 比如 有几个选项 ; 1 2 3 4 5 6 7 8 按对应的键,会执行不同的操作。 这里面有2个问题 :1 简单界面怎么实现 2 怎么实现 按键 执行 某个 函数或 其他的。 ......
 ·哪里有test director 7.6下载    »显示摘要«
    摘要: 如题 ......


用eWebEditor上传图片显示的问题

目录结构:  
      AdminSystem   管理后台  
      eWebEditor  
      UploadFile   这个是存放上传文件  
      disp.asp   为显示文件。  
   
  大家帮忙看下它的上传代码:  
   
   
    初始化上传限制数据  
  Sub   InitUpload()  
  sType   =   UCase(Trim(Request.QueryString("type")))  
  sStyleName   =   Get_SafeStr(Trim(Request.QueryString("style")))  
  sSql   =   "select   *   from   ewebeditor_style   where   s_name="   &   sStyleName   &   ""  
  oRs.Open   sSql,   oConn,   0,   1  
  If   Not   oRs.Eof   Then  
  sBaseUrl   =   oRs("S_BaseUrl")  
  nUploadObject   =   oRs("S_UploadObject")  
  nAutoDir   =   oRs("S_AutoDir")  
  sUploadDir   =   oRs("S_UploadDir")  
   
  sUploadDir   =   "../"&sUploadDir    
   
  Select   Case   sBaseUrl  
  Case   "0"  
  sContentPath   =   oRs("S_ContentPath")  
  Case   "1"  
  sContentPath   =   RelativePath2RootPath(sUploadDir)  
  sContentPath   =   sUploadDir  
  Case   "2"  
  sContentPath   =   RootPath2DomainPath(RelativePath2RootPath(sUploadDir))  
  End   Select  
   
  Select   Case   sType  
  Case   "REMOTE"  
  sAllowExt   =   oRs("S_RemoteExt")  
  nAllowSize   =   oRs("S_RemoteSize")  
  Case   "FILE"  
  sAllowExt   =   oRs("S_FileExt")  
  nAllowSize   =   oRs("S_FileSize")  
  Case   "MEDIA"  
  sAllowExt   =   oRs("S_MediaExt")  
  nAllowSize   =   oRs("S_MediaSize")  
  Case   "FLASH"  
  sAllowExt   =   oRs("S_FlashExt")  
  nAllowSize   =   oRs("S_FlashSize")  
  Case   Else  
  sAllowExt   =   oRs("S_ImageExt")  
  nAllowSize   =   oRs("S_ImageSize")  
  End   Select  
  Else  
  OutScript("parent.UploadError(无效的样式ID号,请通过页面上的链接进行操作!)")  
  End   If  
  oRs.Close  
    任何情况下都不允许上传asp脚本文件  
  sAllowExt   =   Replace(UCase(sAllowExt),   "ASP",   "")  
  End   Sub  
   
   
   
    转为根路径格式  
  Function   RelativePath2RootPath(url)  
  Dim   sTempUrl  
  sTempUrl   =   url  
  If   Left(sTempUrl,   1)   =   "/"   Then  
  RelativePath2RootPath   =   sTempUrl  
  Exit   Function  
  End   If  
   
  Dim   sWebEditorPath  
  sWebEditorPath   =   Request.ServerVariables("SCRIPT_NAME")  
  sWebEditorPath   =   Left(sWebEditorPath,   InstrRev(sWebEditorPath,   "/")   -   1)  
   
  Do   While   Left(sTempUrl,   3)   =   "../"  
  sTempUrl   =   Mid(sTempUrl,   4)  
  sWebEditorPath   =   Left(sWebEditorPath,   InstrRev(sWebEditorPath,   "/")   -   1)  
  Loop  
  RelativePath2RootPath   =   sWebEditorPath   &   "/"   &   sTempUrl  
  End   Function  
   
  对函数RelativePath2RootPath   怎样改动使上传文件上传到UploadFile   中  
   
   
   
   
   
   
   
 

NO.1   作者: net_lover

Function   RelativePath2RootPath(url)  
      RelativePath2RootPath   =   Server.MapPath("UploadFile")   &   "\"  
  End   Function


    摘要: 在window 2000 server 上安装mysql后,正常启动时初始化用户为:test密码为:test为什么在次登录的时候就不用密码也能登录为什么? ......
» 本期热门文章:

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