Uma função asp que converte caminhos absolutos em caminhos relativos. Amigos que precisam dela podem salvá-la. Copie o código do código da seguinte forma:
'===============================================
'Nome da função: ChkMapPath
'Função: Converte caminho relativo em caminho absoluto
'Parâmetro: strPath ---- caminho original
'Valor de retorno: caminho absoluto
'===============================================
Função ChkMapPath(ByVal strPath)
Escurecer caminho completo
strPath = Substituir(Substituir(Trim(strPath), /, /), //, /)
Se strPath = Então strPath = .
Se InStr(strPath,:/) = 0 Então
fullPath = Servidor.MapPath(strPath)
Outro
strPath = Substituir(strPath,../,)
fullPath = Trim(strPath)
If Right(fullPath, 1) = / Então
CaminhoCompleto = Esquerda(CaminhoCompleto, Len(CaminhoCompleto) - 1)
Terminar se
Terminar se
ChkMapPath = caminhocompleto
Função final