sayed Posted April 10, 2006 Report Share Posted April 10, 2006 Problēma sekojoša uz mana servera viss oK, bet kad uzlieku uz cita servera links nedarbojas kāpēc tā? } elseif ($a=="vesture") { include "other/vesture.php"; } Link to comment Share on other sites More sharing options...
andrisp Posted April 10, 2006 Report Share Posted April 10, 2006 Visticamāk tev uz tava servera ir ieslēgts register_globals. Tātad tam $a ir jābūt $_GET['a'].. Pamēģini nomainīt. Link to comment Share on other sites More sharing options...
sayed Posted April 10, 2006 Author Report Share Posted April 10, 2006 Varetu lūdzu piemēru? esu šajā jomā vēl tikai iesācējs :( Link to comment Share on other sites More sharing options...
Stopp Posted April 10, 2006 Report Share Posted April 10, 2006 (edited) if ($_GET['a']=="vesture") Edited April 10, 2006 by Stopp Link to comment Share on other sites More sharing options...
sayed Posted April 10, 2006 Author Report Share Posted April 10, 2006 Uj lielais paldies no manis!!!! Link to comment Share on other sites More sharing options...
sayed Posted April 10, 2006 Author Report Share Posted April 10, 2006 Tagad problema sekojoša Ka visu parliku uz get vairs man neiet cutenews (tipa jaunumi - lietoju gatavu, jo vēl nesu iemacījies pats taisīt) Un atkal uz mana serv. viss ok, bet uz cita nekā Link to comment Share on other sites More sharing options...
Stopp Posted April 10, 2006 Report Share Posted April 10, 2006 atstāj visus $a u.c. mainīgos, kā ir, tikai faila sākumā pieliec dažas rindiņas $a=$_GET['a']; utt ar visiem mainīgajiem. Link to comment Share on other sites More sharing options...
bubu Posted April 10, 2006 Report Share Posted April 10, 2006 Uz sava servera atrodi php.ini failu un tajā nomaini register_globals no on uz off. Link to comment Share on other sites More sharing options...
sayed Posted April 10, 2006 Author Report Share Posted April 10, 2006 Piemēru plzz! Link to comment Share on other sites More sharing options...
Zoom Posted April 10, 2006 Report Share Posted April 10, 2006 register_globals = on register_globals = Off :D Link to comment Share on other sites More sharing options...
sayed Posted April 10, 2006 Author Report Share Posted April 10, 2006 ha ha very fanny Link to comment Share on other sites More sharing options...
bubu Posted April 10, 2006 Report Share Posted April 10, 2006 Tieši to jau tak arī tev es teicu izdarīt on uz off nomainīt! Link to comment Share on other sites More sharing options...
Stopp Posted April 10, 2006 Report Share Posted April 10, 2006 (edited) nuu, register_globals=off jau nepalīdz ar kodu. piemērs ar funkciju extract() <?php extract($_GET); // un tad var darīt tā, kā tu darīji sākumā if ($a=="vesture") { include "other/vesture.php"; } ?> extract($_GET); vietā tu tikpat labi vari lietot $a=$_GET['a']; utt ar katru $_GET elementu. edit: ieskaties eng-lv vārdnīcā, ko nozīmē fanny :D Edited April 10, 2006 by Stopp Link to comment Share on other sites More sharing options...
andrisp Posted April 10, 2006 Report Share Posted April 10, 2006 hm.. extract izmantošana sākuma nebūtu tas pats, kas atstāt register_globals ON ? Link to comment Share on other sites More sharing options...
bubu Posted April 10, 2006 Report Share Posted April 10, 2006 Stopp: tu to man? Es tak ļoti labi zinu ko dara on->off. Ne jau ar kodu tas palīdzēs, bet palīdzēs saparast (ja galva ir uz pleciem), kurā vietā kods jāmaina. Link to comment Share on other sites More sharing options...
Recommended Posts