php - Significance of the backslash? -


magic_quotes_gpc

we hate , many servers still use setting , knowingly enough provides argue it's safer must disagree.

the question have is, backslash needed for? want remove them can not sure if needed?

edit

other sql injection.

magic_quotes_gpc() provided based on misguided notion data submitted php external source inserted database. if wanted send data somewhere other database, had remove slashes php inserted, doubling work required.

as well, not databases use slashes escaping metacharacters. \' fine in mysql, in ms access, escaping single quote '' - not php doing unecessary work, in many situations, doing work wrong begin with.

and then, on top of that, addslashes (which magic_quotes_gpc() calling internally) can't handle forms of sql injection attacks, particularly unicode used. addslashes glorified form of str_replace("'", "\\'", $string), works @ ascii level - plenty of unicode sequences can regular ascii, turned sql metacharacters after simplistic addslashes() has wreaked havoc.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -