Ejecutar archivos con extensión .asp como PHP.

3 diciembre, 2010

En el archivo .htaccess añadimos esta línea.

AddHandler application/x-httpd-php .asp

Lógicamente el contenido del archivo tiene que ser código PHP.

Función stripslashes para ASP (VBScript)

11 noviembre, 2010

Esta función sería la equivalente a su homónima de PHP.

function stripslashes(safeString)
dim regEx
set regEx = new RegExp
with regEx
.Global = true
.IgnoreCase = true
.Pattern = "\\([\000\010\011\012\015\032\042\047\134\140])"
end with
stripslashes = regEx.replace(safeString, "$1")
set regEx = nothing
end function

Función addslashes para ASP (VBScript)

11 noviembre, 2010

Esta función sería la equivalente a su homónima de PHP.


function addslashes(unsafeString)
dim regEx
set regEx = new RegExp
with regEx
.Global = true
.IgnoreCase = true
.Pattern = "([\000\010\011\012\015\032\042\047\134\140])"
end with
addslashes = regEx.replace(unsafeString, "\$1")
set regEx = nothing
end function