osk Posted December 18, 2005 Report Share Posted December 18, 2005 Parasti lietoju global=off, bet kāpēc tā vajag? Kas tur ir labāks? Drošība? Ja tā, tad kāpē izvietojamajos serveros parasti ir on? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 18, 2005 Report Share Posted December 18, 2005 (edited) Normaali nokonfigureetaa serverii ir OFF -- ja dod hosteeties tad vinjus iesleedz, jo ne jau visi taisa ar OFF :( P.S. es parasti paluudzu lai vinjus Izsleedz ;) to var izdariit katram hostam atseviskji (pat katrai DIR) ;) edit: ja kaadam intresee -- <Directory "C:/Apache/htdocs/kautkas"> php_flag register_globals on </Directory> ------- Edited December 18, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
php_Stopp Posted December 18, 2005 Report Share Posted December 18, 2005 6. PHP versijā tāda register_globals vispār nebūs.. :) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 18, 2005 Report Share Posted December 18, 2005 php_Stopp--> un ko dariit ar n miljoniem skriptu kas liidz tam laikam buus izveidoti? savietojamiibai jaabuut jebkuraa gadijumaa... a taa hosteetaajs uzliek jaunu versiju un lietotaaji var iet '@$!&'.... Link to comment Share on other sites More sharing options...
vladimirs Posted December 18, 2005 Report Share Posted December 18, 2005 skaidrs ka var iet dirst. bet neliks jau visi uzreiz taadu versiju.. nehuj nevaig ja iepriekshejaa iet ka nemetaas. Link to comment Share on other sites More sharing options...
bubu Posted December 19, 2005 Report Share Posted December 19, 2005 un ko dariit ar n miljoniem skriptu kas liidz tam laikam buus izveidoti?savietojamiibai jaabuut jebkuraa gadijumaa... Kāpēc? Palasi šo: http://www.php.net/~derick/meeting-notes.h...egister-globals Link to comment Share on other sites More sharing options...
Klez Posted December 19, 2005 Report Share Posted December 19, 2005 es jau nu gan likshu 6 versiju ... :) 6 noteikti buus daudz eertaak programmmeet :) Link to comment Share on other sites More sharing options...
bubu Posted December 19, 2005 Report Share Posted December 19, 2005 Kāpēc tu tā domā, Klez? Link to comment Share on other sites More sharing options...
[Ya] Posted December 19, 2005 Report Share Posted December 19, 2005 (edited) tādos gadījumos palīdz zāles, savācam sarakstu ar mainigajiem kas tiek padoti, && uztaisam Array prieksh $_GET && priekš $_POST un pieliekam skriptu GET foreach($_GET as $key => $value) { if(in_array($key,$getarray)) { ${$key}=$value; } } POST foreach($_POST as $key => $value) { if(in_array($key,$postarray)) { ${$key}=$value; } } un ludzu nekādu problēmu :) bieži šitādu pielietoju :) galvenais pielikt pašā sākumā šito :) Edited December 19, 2005 by [Ya] Link to comment Share on other sites More sharing options...
bubu Posted December 19, 2005 Report Share Posted December 19, 2005 (edited) [Ya] ? Kāpēc sev dzīvi sarežģī? :) http://lv.php.net/manual/en/function.extract.php tb: extract($_POST); Bet tas jau nav vienīgais sliktums (drošība). Vēl jau arī ērtums. Redzu piemēram kodā mainīgo $page. Un tad jāsāk domāt, kur tas definēts, vai tas globāls vai nē.. A ja redzētu $_GET['page'] viss uzreiz būtu skaidrs. Edited December 19, 2005 by bubu Link to comment Share on other sites More sharing options...
blackhalt Posted December 20, 2005 Report Share Posted December 20, 2005 http://securephp.damonkohler.com/index.php/Global_Variables Link to comment Share on other sites More sharing options...
Recommended Posts