Home > Backend Development > PHP Tutorial > html - In PHP, the textarea input box automatically adds a backslash before ', how to solve it?

html - In PHP, the textarea input box automatically adds a backslash before ', how to solve it?

WBOY
Release: 2016-10-22 00:14:23
Original
1233 people have browsed it

I made a PHP file with a textarea input box in it, but every time I copy and paste the code, a backslash is automatically added before " and '. How to crack this?

Reply content:

I made a PHP file with a textarea input box in it, but every time I copy and paste the code, a backslash is automatically added before " and '. How can I crack this?

Set magic_quotes_gpc in php.ini to Off, but it is generally recommended that when processing PHP, you still have to deal with single quotes, such as if(!magic_quotes_gpc()){ addslashes($str);} Prevent sql injection

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template