Cannot delete row using addcslashes ()

I am trying to learn how to avoid simple characters. I am printing an ASCII character>. But when I print it after using the addcslashes function .. nothing happens. Why is this?

$da=ord('>'); echo $da."<br/>"; $not_escaped="><?"; $escaped = addcslashes($not_escaped, "\61...\64"); echo $escaped; 

I followed their documents ... but my example above does not work. Thye also uses 2 seperators! @ Between the range of the range of ASCII numbers. What does it mean?

 $escaped = addcslashes($not_escaped, "\0..\37!@\177..\377"); 
+1
string php
Feb 18 '12 at 12:16
source share
1 answer

ASCII codes in $charlist are octal, not decimal. To avoid the ">" (decimal: 62, octal: 76), use this code:

 $escaped = addcslashes($not_escaped, "\76"); 

For a range, use two points, not three ("a..z", not "a ... z").

+1
Feb 18 '12 at 12:48
source share



All Articles