Jump to content
php.lv forumi

Undefined variable


Klokjis

Recommended Posts

nju reku saape taada:

 

Undefined variable: _GET

kodaa:

 

<?

switch($_GET['id']) {
   case "Jaunumi":
       include('viens.inc.php');
       break;
   case "Par_Mani":
       include('divi.inc.php');
       break;
   default:
       include('viens.inc.php');
       break;
};

?>

Link to comment
Share on other sites

hmm

<?
if(isset($_GET['id'])){ $id = $_GET['id']; }
else { $id = "Jaunumi"; }


switch($id) {
  case "Jaunumi":
      include('viens.inc.php');
      break;
  case "Par_Mani":
      include('divi.inc.php');
      break;
  default:
      include('viens.inc.php');
      break;
}; //te man liekas nav jaabuut semikolam

?>

Link to comment
Share on other sites

; This directive tells PHP whether to declare the argv&argc variables (that
#393
; would contain the GET information).  If you don't use these variables, you
#394
; should turn it off for increased performance.
#395
register_argc_argv = On

Link to comment
Share on other sites

nezinu... :DD

nu man it kaa jau bija on tas ko kristabs teica, bet negaaja. es vnk uzmetu uzs free hostinga un tagad iet...

 

aa... varbuut pie reizes vari izstaastiit kaada atshkjiriiba ir starp *.inc.php un starp *.php

ok *.inc nevajag izmantot jo to var nolasiit no malas... a nav gadiijumaa *.inc.php = *.php??

Edited by Klokjis
Link to comment
Share on other sites

aa... varbuut pie reizes vari izstaastiit kaada atshkjiriiba ir starp *.inc.php un starp *.php

ok *.inc nevajag izmantot jo to var nolasiit no malas... a nav gadiijumaa *.inc.php = *.php??

19611[/snapback]

 

atskirība starp inc, php un inc.php ir taada pati kaa starp zaljaam un sarkanaama zandeleem, respektivi nekaada - gaumes lieta, kaa gribi taa konfiguree serveri un sauc failus, ja noradisi ka ar inc tev glabajas php faili, tad, verot tiesi valjaa, sos serveris izpildiis kaa php.

Link to comment
Share on other sites

×
×
  • Create New...