vitao.web Posted February 11, 2010 Report Share Posted February 11, 2010 Varbūt "zaļa" kluda, bet kas lietas laba darams? Fatal error: Call to undefined function get_magic_quotes_gpc() in C:\AppServ\www\point\lib\functions.php on line 170 ============================ ; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = On vai OFF Ta pat radas tas errors :S Quote Link to comment Share on other sites More sharing options...
2easy Posted February 11, 2010 Report Share Posted February 11, 2010 (edited) nelieto to funkciju vsp bet ja tomēr ļoti vajag, tad pārbaudi ar function_exists('get_magic_quotes_gpc') Edited February 11, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
vitao.web Posted February 11, 2010 Author Report Share Posted February 11, 2010 nelieto to funkciju vsp bet ja tomēr ļoti vajag, tad pārbaudi ar function_exists('get_magic_quotes_gpc') Kadu tad funkciju tu ieteiktu? Quote Link to comment Share on other sites More sharing options...
2easy Posted February 11, 2010 Report Share Posted February 11, 2010 to pašu var izdarīt ar ini_get('magic_quotes_gpc') Quote Link to comment Share on other sites More sharing options...
vitao.web Posted February 11, 2010 Author Report Share Posted February 11, 2010 to pašu var izdarīt ar ini_get('magic_quotes_gpc') nevaru iebraukt... iedosu sava koda gabalu un tu varetu paradit, ka domajis esi, tad maybe sapratisu :) function smartQuotes($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...
anonīms Posted February 11, 2010 Report Share Posted February 11, 2010 Ir maz kāda jēga tai f-jai? Kapēc gan neizmanto escape string un intval? Quote Link to comment Share on other sites More sharing options...
2easy Posted February 11, 2010 Report Share Posted February 11, 2010 jā, dzēs ārā to pārbaudi if (get_magic_quotes_gpc()) { $value = stripslashes($value); } tas ir novecojis kods Quote Link to comment Share on other sites More sharing options...
Maris-S Posted February 11, 2010 Report Share Posted February 11, 2010 (edited) Emm, vispār tur ar novecošanu nav nekāda sakara, tā funkcija ir nepieciešama gadījumos, ja tie magic quoti ir ieslēgti uz servera. Parasti es tādu funkciju atstāju. Kāpēc viņa Tev nestrādā nav ne jausmas, pamēģini darīt kā 2easy teica: function smartQuotes($value) { if (ini_get('magic_quotes_gpc')) { $value = stripslashes($value); } if (!is_numeric($value)) { $value = mysql_real_escape_string($value); } return $value; } Edited February 11, 2010 by Maris-S Quote Link to comment Share on other sites More sharing options...
2easy Posted February 11, 2010 Report Share Posted February 11, 2010 Maris-S un vitao.web pamācāties no wapleta, kā vajag taisīt stripslashes, kad ir ieslēgts magic_quotes_gpc http://php.lv/f/topic/15619-iebuveta-funkcija/page__view__findpost__p__120286 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.