最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 返回一个路径的目录名与父路径
时间:2022-06-29 13:47:37 编辑:袖梨 来源:一聚教程网
'############## 返回一个路径的目录名#########################################################################
function getpath(givepath) '返回一个路径的目录名
dim i,num,path
path=givepath
for i=0 to len(path)-1
if mid(path,len(path)-i,1)="/" or mid(path,len(path)-i,1)="" then
exit for
end if
next
getpath=trim(right(path,i))
end function
'#######################################################################################
function parentn(path) '返回一个路径的父路径
dim i
for i=0 to len(path)-1
if mid(path,len(path)-i,1)="/" or mid(path,len(path)-i,1)="" then
exit for
end if
next
parentn=left(path,len(path)-i-1)
end function
'实例使用方法
getpath(givepath)
parentn(path)
相关文章
- 《CSS3实战》笔记渐变设计(三) 09-15
- Dify Custom Tool 配置化实践:用一行提示词接入新报表 09-15
- 《CSS3实战》笔记渐变设计(二) 09-15
- CSS3实现动态翻牌效果 仿百度贴吧3D翻牌一次动画特效 09-15
- Octop AI 助手官网:腾讯云开源项目入口、API 与环境配置 09-15
- 《CSS3实战》笔记渐变设计(一) 09-15