Does PHP 5.3.1 add a slash ("\") by default? -


जब मैं लिखता हूँ

इनपुट डेटा : hel'l "लो

प्रिंट_आर ($ _ POST) डिस्प्ले हैल्डेड \" लो

और जब मैं

  का उपयोग करता हूं (get_magic_quotes_gpc ()) {mysql_real_escape_string ($ _ POST);  

प्रदर्शन

  हेल \\\ '\\\ "lo  

क्योंकि PHP स्वचालित रूप से स्लैश जोड़ता है, क्या mysql_real_escape_string ?

नहीं उपयोग करना आवश्यक है , संस्करण 5.3 से बाद में, डिफ़ॉल्ट रूप से कोई स्लैश नहीं जोड़ा जाएगा। यह भी ध्यान रखें कि addslashes mysql_real_escape_string के लिए प्रतिस्थापन नहीं है; आप पढ़ सकते हैं इसके बारे में अधिक।


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -