生成html路径怎么修改

linjing35 2011-12-09 04:44:41
Sub ContentIDHtml(Pattern,selID)
Dim SQLID, AllID
Dim totalnum, FileUrl, FolderPath, FileName, FilePath
On Error Resume Next
selID = Request("selID")
AllID = Split(selID, ",")
If selID = "" Then
Response.Write "<script>alert('请选择后操作');history.back()</script>"
End If
totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Article] WHERE ID in (" & selID & ")")(0)
SQL = "SELECT * FROM Gq_Article WHERE ID in (" & selID & ")"
Set rs = tee5.Execute(SQL)
SQL=Rs.GetRows(totalnum)
Set Rs = Nothing
If Pattern = 1 then SQLID= UBound(AllID): Else SQLID= UBound(SQL,2)
If Pattern = 1 then Response.Write "<ol>"
If Pattern = 1 then Response.Write "<b>生成文章内容(HTML)开始......</b><br><br>"
Dim pinyin
For i = 0 To SQLID
FolderPath = tee5.ServerDir & SQL(1,i) & tee5.ServerDir
tee5.CreatPathEx (FolderPath)
FileUrl = tee5.WebUrl & "/Temp/8.asp?ID=" & Clng(SQL(0,i))
FileName = "News_" & SQL(0,i)
FilePath = FolderPath & FileName & ".html"
Call GetRemoteFiels(FileUrl, FolderPath, FileName)
If Pattern = 1 then Response.Write "<li style=""font-size: 12px;"">生成文章内容HTML页完成... <a href=" & FilePath & " target=_blank>" & Server.MapPath(FilePath) & "</a></li>" & vbNewLine
Response.Flush
Next
If Pattern = 1 then Response.Write "<br><br><b>恭喜您!文章内容HTML全部生成完毕!</b>"
If Pattern = 1 then Response.Write "</ol>"
End Sub




目前生成的结果是XXX.com/1/xxx.html
XXX.com/2/xxx.html
XXX.com/3/xxx.html
XXX.com/4/xxx.html

目标结果是 XXX.com/wodiyi/xxx.html
XXX.com/wodier/xxx.html
XXX.com/wodisan/xxx.html
XXX.com/wodisi/xxx.html



请问如何修改红色部分或者添加什么内容 不胜感激
...全文
215 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
linjing35 2011-12-12
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 theforever 的回复:]
FolderPath = tee5.ServerDir & SQL(1,i) & tee5.ServerDir

SQL(1,i)的内容就是1,2,3,4了

那样,就可以用一个变量数据作翻译,
dim theforever
theforever="yi,er,san,si,....."
然后把上面那句改成:
FolderPath = tee5.ServerDir……
[/Quote]

感谢2楼朋友的热心帮助,不知道原因出在哪,还是没有解决,还是感谢
  • 打赏
  • 举报
回复
要不然就在2楼那里把theforever里的数据都加上wodi就可以了。考虑到这样的数字翻译成拼音的情况可能在别处也会用到,所以用3楼的形式更好点。
  • 打赏
  • 举报
回复
忘了还有个wodi,加上它就行了
FolderPath = tee5.ServerDir & "wodi" & theforever.split(",")(SQL(1,i)-1) & tee5.ServerDir


  • 打赏
  • 举报
回复
FolderPath = tee5.ServerDir & SQL(1,i) & tee5.ServerDir

SQL(1,i)的内容就是1,2,3,4了

那样,就可以用一个变量数据作翻译,
dim theforever
theforever="yi,er,san,si,....."
然后把上面那句改成:
FolderPath = tee5.ServerDir & theforever.split(",")(SQL(1,i)-1) & tee5.ServerDir
灬上海爽爷 2011-12-09
  • 打赏
  • 举报
回复
er
san
si
在数据库里有字段么?
假设是第二个字段。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧