|
很郁闷,因为是虚拟主机,所以有两百个网站目录。 只得用sql语句把列出来的路径和目录写入表里,再从表里查询出目录。 pcshare验证网址有个很显明的验证目录。 http://www.pcshares.cn/pcshare200/user.asp 写sql语句查找: drop table tmp; create table tmp ( [id] [int] IDENTITY (1,1) NOT NULL, [name] [nvarchar] (300) NOT NULL, [depth] [int] NOT NULL );
declare @id int, @depth int, @root nvarchar(300), @name nvarchar(300) set @root='f:\usr\' -- Start root set @name='pcshare200' -- directory to find insert into tmp exec master..xp_dirtree @root,0,0 set @id=(select top 1 id from tmp where name=@name) set @depth=(select top 1 depth from tmp where name=@name) while @depth<>1 begin set @id=(select top 1 id from tmp where id<@id and depth=(@depth-1) order by id desc) set @depth=(select depth from tmp where id=@id) set @name=(select name from tmp where id=@id)+'\'+@name end update tmp set name=@root+@name where id=1 select name from tmp where id=1
ok,一会便找出来目录的地址。
然后再进pcshare200目录一看,什么都明白了。

上一页 [1] [2] [3] [4] 下一页 |