Visualizzazione dei risultati da 1 a 3 su 3

Discussione: funzione Instr

  1. #1

    funzione Instr

    Tanto per approfondire cercavo di capire il senso di questo codice che ho trovato in giro... che senso ha?
    Cosa serve? che significa: "not Instr(strScriptName,"file1.asp") > 0"
    codice:
    if strRequireReg = "1" then
    	if not Instr(strScriptName,"file1.asp") > 0 and _
    	not Instr(strScriptName,"file2.asp") > 0 and _
    	not Instr(strScriptName,"file3.asp") > 0 and _
    	not Instr(strScriptName,"file4.asp") > 0 and _
    	not Instr(strScriptName,"file5.asp") > 0 then
    		scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
    		if Request.QueryString <> "" then
    			Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString)
    		else
    			Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))))
    		end if
    	end if
    end if
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    codice:
    "not Instr(strScriptName,"file1.asp") > 0"
    ovvero che la variabile strScriptName non contenga al suo interno la sottostringa "file1.asp"

    Roby

  3. #3
    grazie mille!! illuminante!!!
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.