
29/04/2005, 13:23
|
 | | | Fecha de Ingreso: mayo-2003 Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 22 años Puntos: 5 | |
HOLA, no c mucho de PHP pero con lo que pusiste en cada uno de los puntos, te puedo ayudar en unos cuantos... 1.
Código:
function NewCookie(nombre, duracion, valores)
response.Cookies(nombre) = valores
response.cookies(nombre).expires = date() + duracion
end function
function GetCookie(nombre)
cookie = request.Cookies(nombre)
if cookie <> "" then
GetCookie = cookie
else
GetCookie = ""
end if
end function
Function DeleteCookies(nombre)
response.Cookies(nombre).expires = date() - 1
End Function
if GetCookie("nombre_del_cookie") <> "" then response.write("Existe el cookie") else response.write("no existe el cookie")
2.
Código:
texto = replace(texto, chr(13), "<br>")
o
texto = replace(texto, vbcrlf, "<br>")
depende.... 3.
Código:
numero = 10000
numero = formatnumber(numero)
response.write(numero)
resultado: 10,000.00 6.
Código:
Function Apostrofe(strTexto, strAccion)
if isnumeric(strAccion) = false then strAccion = 1
if strTexto <> "" or isnull(strTexto) = false then
if strAccion = 1 then
strTexto = replace(strTexto, chr(34), """) '"
strTexto = replace(strTexto, """, """) '"
strTexto = replace(strTexto, chr(37), "%") '%
strTexto = replace(strTexto, "&", "&") '&
strTexto = replace(strTexto, chr(39), "'") ''
else
strTexto = replace(strTexto, """, chr(34)) '"
strTexto = replace(strTexto, """, chr(34)) '"
strTexto = replace(strTexto, "%", chr(37)) '%
strTexto = replace(strTexto, "&", chr(38)) '&
strTexto = replace(strTexto, "'", chr(39)) ''
end if
else
strTexto = ""
end if
Apostrofe = strTexto
End Function
texto = "texto's"
texto = Apostrofe(texto, 1)
response.wrirte(texto)
resultado: texto's esto el explorer lo transforma automáticamente en comilla (') porque es el valor hexadecimal de la comilla.... asi que aqui no lo vas a poder ver, tendras que utilizarlo por ejemplo en una BD y ver el registro como queda afectado... al desplegarlo no es necesario hacerle nada,porque como te dije el explorer hace el trabajo de transofrmar de hexa a el valor orignal
con respecto a los puntos 5 y 7 yo los manejo con javascript y iframes.... si alguien conoce otra forma bienvendio sea...
BTW, puedes ir a www.w3schools.com y encontrar estas funciones con todas sus propiedades y mas
saludos
__________________ Saruman One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.
Última edición por Saruman; 29/04/2005 a las 13:32 |