<cfset theurl="news.com.com/2100-7344-5139640.html?tag=nl">
<cfset deepnessCount = ListLen(trim(theurl), "/")>

there's a flaw in this method to count the 'deepness' of the url.  you can have a url like this and it will throw your deepness true count off, <cfset theurl="news.com.com/2100-7344-5139640.html?newvar=/test">

you wanna do a findnocase on "?" and use a mid() to trim the url string first before attempting to do a listLen.

Nick Han

>>> [EMAIL PROTECTED] 01/22/04 11:42AM >>>
Hi All,
I am trying figure out deepness of the URL

eg:
<cfset theurl="www.wyndham.com/hotels/BWIIH/main.wnt">
<cfset deepnessCount = ListLen(trim(theurl), "/")>

returns me 4 actually it should return me 3 due to ffolder levels

<cfset theurl="news.com.com/2100-7344-5139640.html?tag=nl">
<cfset deepnessCount = ListLen(trim(theurl), "/")>

returns me 2 and I am looking for answer 0 becuase its a root level. I am
trying to fihure how many levels deep is the URL.

Ketan Patel
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to