Anglais Francais Prosygma 

Italie
-
    hebergement 

asp
prosygma_logo



 Divers (1)  Chaînes (31)  Dates (18)  Nombres (8)  Structures (5) 
 Tableaux (6) 
asc/ord - chr - crunch - cstr/(string) - dosql/addslashes - ereg_replace - htmlspecialchars - instr/strpos - instrrev/strrpos - lcase/strtolower - left - len/strlen - ltrim - mid/substr - nl2br - notag - parcelstr - password - replace/str_replace - right - rtrim - space - string/str_repeat - tarea/htmlentities - trim - ucase/strtoupper - ucfirst - undosql/stripslashes - urldecode - urlencode - wrapstr
HTMLSPECIALCHARS 
Convertit tous les caractères spéciaux en entité HTML
ASP
function htmlspecialchars(ch)
   ch = replace(ch,"&","&")
   ch = replace(ch,"""",""")
   ch = replace(ch,"'","'")
   ch = replace(ch,"<","&lt;")
   ch = replace(ch,">","&gt;")
   htmlspecialchars = ch
end function

chaine = htmlspecialchars(chaine)

PHP <Doc> 
$chaine = htmlspecialchars($chaine);

JavaScript
<script>
function htmlspecialchars(ch) {
   ch = ch.replace(/&/g,"&amp;")
   ch = ch.replace(/\"/g,"&quot;")
   ch = ch.replace(/\'/g,"&#039;")
   ch = ch.replace(/</g,"&lt;")
   ch = ch.replace(/>/g,"&gt;")
   return ch
}

chaine = htmlspecialchars(chaine)
</script>

© ASP-PHP.net 11/01/2003