Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

folder details?
Is there a way to get the subfolder, and folder that a file is in, using the
filesystem or something else??

Let's say my user.asp file is user specific.

it would be located in folders as follows

user/uni/user.asp

i would need a way of finding what the subfolder the file is in, as well as
the root folder it is in.

is this possible??

--
Thanks,
Bam



Report this thread to moderator Post Follow-up to this message
Old Post
Bam
08-16-07 02:57 AM


Re: folder details?
Bam wrote on 16 aug 2007 in microsoft.public.inetserver.asp.general:

> Is there a way to get the subfolder, and folder that a file is in,
> using the filesystem or something else??
>
> Let's say my user.asp file is user specific.
>
> it would be located in folders as follows
>
> user/uni/user.asp
>
> i would need a way of finding what the subfolder the file is in, as
> well as the root folder it is in.
>
> is this possible??

<%=Request.ServerVariables("URL")%>

<%=Request.ServerVariables("PATH_INFO")%>

<%=Request.ServerVariables("PATH_TRANSLATED")%>

<%=Request.ServerVariables("APPL_PHYSICAL_PATH")%>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Report this thread to moderator Post Follow-up to this message
Old Post
Evertjan.
08-16-07 12:56 PM


Re: folder details?
....
> Bam wrote on 16 aug 2007 in microsoft.public.inetserver.asp.general:
> 
>
> <%=Request.ServerVariables("URL")%>
>
> <%=Request.ServerVariables("PATH_INFO")%>
>
> <%=Request.ServerVariables("PATH_TRANSLATED")%>
>
> <%=Request.ServerVariables("APPL_PHYSICAL_PATH")%>
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

Thanks for the reply, but that is only part of what I need.
the path_info and URL shows the same thing. What I need IS contained in
there, but is there a way to extract it?

so I could use the info like this. Say......

Request.ServerVariables("PATH_INFO")

gives me this for example::

Bam/uni30/index.asp    Now what I need is to extract out the Bam    varUSER
= "Bam" and varUNI = 30

is there a way to do this??




Report this thread to moderator Post Follow-up to this message
Old Post
Bam
08-16-07 12:56 PM


Re: folder details?
Bam wrote  on Thu, 16 Aug 2007 07:07:33 -0400:

> ... 
 
 
 
 
 
 
 
 
 
 

 

> Thanks for the reply, but that is only part of what I need.
> the path_info and URL shows the same thing. What I need IS contained in
> there, but is there a way to extract it?

> so I could use the info like this. Say......

> Request.ServerVariables("PATH_INFO")

> gives me this for example::

> Bam/uni30/index.asp    Now what I need is to extract out the Bam   varUSER
> = "Bam" and varUNI = 30

> is there a way to do this??

Look at the Split function

eg.

vPathComponents = Split(Request.ServerVariables("PATH_INFO"),"/")

in the case of Bam/uni30/index.asp you'll find this gives the following:

vPathComponents(0) = "Bam"
vPathComponents(1) = "uni30"
vPathComponents(2) = "index.asp"

So you can just use those array elements

varUSER = vPathComponent(0)
varUNI = vPathComponent(1)

:)

Dan



Report this thread to moderator Post Follow-up to this message
Old Post
Daniel Crichton
08-16-07 12:56 PM


Re: folder details?
Bam wrote on 16 aug 2007 in microsoft.public.inetserver.asp.general:
 

[please do not quote signatures. Removed]


> Thanks for the reply, but that is only part of what I need.
> the path_info and URL shows the same thing. What I need IS contained
> in there, but is there a way to extract it?
>
> so I could use the info like this. Say......
>
> Request.ServerVariables("PATH_INFO")
>
> gives me this for example::
>
> Bam/uni30/index.asp    Now what I need is to extract out the Bam
> varUSER = "Bam" and varUNI = 30
>
> is there a way to do this??

Yes, thast is simple string manipulation,
and can be done, when you programme in asp-vbscript,
using instr(), left(), mid(), right(),
or, my preference, with Regex.

Or, if you like asp-jscript,
using the near equivalent functions,
or in even more consize regex.

Surely, you don't want to miss the joy of coding that yourself?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Report this thread to moderator Post Follow-up to this message
Old Post
Evertjan.
08-16-07 11:56 PM


Re: folder details?
>> Bam wrote on 16 aug 2007 in microsoft.public.inetserver.asp.general: 
>
> Thanks for the reply, but that is only part of what I need.
> the path_info and URL shows the same thing. What I need IS contained in
> there, but is there a way to extract it?
>
> so I could use the info like this. Say......
>
> Request.ServerVariables("PATH_INFO")
>
> gives me this for example::
>
> Bam/uni30/index.asp    Now what I need is to extract out the Bam
> varUSER
> = "Bam" and varUNI = 30
>
> is there a way to do this??


Hey thanks guys. You guys rock!!

I knew there was a way, but from being so sick, my mind isn't back to normal
yet.

Bam



Report this thread to moderator Post Follow-up to this message
Old Post
Bam
08-16-07 11:56 PM


Re: folder details?
> Look at the Split function
>
> eg.
>
> vPathComponents = Split(Request.ServerVariables("PATH_INFO"),"/")
>
> in the case of Bam/uni30/index.asp you'll find this gives the following:
>
> vPathComponents(0) = "Bam"
> vPathComponents(1) = "uni30"
> vPathComponents(2) = "index.asp"
>
> So you can just use those array elements
>
> varUSER = vPathComponent(0)
> varUNI = vPathComponent(1)
>
> :)
>
> Dan


so my code should look like something like this?

Request.ServerVariables("PATH_INFO")
vPathComponents = Split(Request.ServerVariables("PATH_INFO"),"/")

playername = vPathComponent(0)
vuniverse = vPathComponent(1)

am i missing something?



Report this thread to moderator Post Follow-up to this message
Old Post
Bam
08-16-07 11:56 PM


Re: folder details?
never mind. with some tweaking i got it based on Daniel's post


thanks again to both of you!!



Report this thread to moderator Post Follow-up to this message
Old Post
Bam
08-16-07 11:56 PM



Young Natasha is used in all holes! Click the picture to watch for free!
[IMG]http://shocking-p0rn-videos.info/th
umb.jpg[/IMG]








More videos:
Am
ateur gay videos from Pwnzurface
Am
ateur gay videos from Pwnzurface
vin diesel homosexual[/
URL]
[URL=http://me.emu.edu.tr/asme/forum/viewtopic.php?p=11337]Links to homosexual pic

Amateur g
ay videos from Zaza
free gay military video[/UR
L]
[URL=http://www.ygi.edu.cn/student2/zbzrzx/viewtopic.php?p=5616]Links to here homo
sexual original shirt sold
Amateur g
ay videos from Emdegh5
Links to homosexual video[/UR
L]
[URL=http://student.educ.umu.se/~joshio03/sda07v03/phpBB2/viewtopic.php?p=14079]Am
ateur gay videos from Pune

Report this thread to moderator Post Follow-up to this message
Old Post
Daburghlo0
08-24-07 04:41 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:29 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.