krisp Posted October 20, 2010 Report Share Posted October 20, 2010 Google mani galīgi samulsināja un esmu apjucis. Kad un kādā secībā jālieto stripslashes(), mysql_real_escape_string() atkarībā no magic_quotes_gpc ? Quote Link to comment Share on other sites More sharing options...
mefisto Posted October 20, 2010 Report Share Posted October 20, 2010 http://lv.php.net/manual/en/book.pdo.php Quote Link to comment Share on other sites More sharing options...
Rincewind Posted October 20, 2010 Report Share Posted October 20, 2010 Google mani galīgi samulsināja un esmu apjucis. Kad un kādā secībā jālieto stripslashes(), mysql_real_escape_string() atkarībā no magic_quotes_gpc ? Es šādu funkciju lietoju, tiek galā ar abiem variantiem: function check_input($value){ if (get_magic_quotes_gpc()){ $value = stripslashes($value); } if (!is_numeric($value)){ $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } Quote Link to comment Share on other sites More sharing options...
krisp Posted October 20, 2010 Author Report Share Posted October 20, 2010 skaidrs. paldies ;) Quote Link to comment Share on other sites More sharing options...
Kaklz Posted October 21, 2010 Report Share Posted October 21, 2010 Par magic quotes mūsdienu programmētājiem, manuprāt, vispār vairs nebūtu jāzina: WarningThis feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.