ugrás a tartalomhoz

Archívum - Dec 23, 2009 - Fórum téma

Sok-sok warning

S3RI0US · 2009. Dec. 23. (Sze), 16.42
Hali!
Így karácsony előtt programozgatok, és az alábbi kód kiírt pár warningot

40  <?php
41  $menu = array(
42       "not_registered" => 'menu1.php',
43       "registered" => 'menu2.php',
44  );
45  if ( array_key_exists( $_GET['menu'], $menus ) )  
46  {  
47  $menu = $menus[$_GET['menu']];    
48  }  
49  else 
50  {  
51  $menu = "not_found.php";  
52  }  
53  				
54  include 'menu';
A sorok számai a sorok elején vannak.
A warningok:
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/musicrco/public_html/index.php on line 45

Warning: include(menu) [function.include]: failed to open stream: No such file or directory in /home/musicrco/public_html/index.php on line 54

Warning: include(menu) [function.include]: failed to open stream: No such file or directory in /home/musicrco/public_html/index.php on line 54

Warning: include() [function.include]: Failed opening 'menu' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/musicrco/public_html/index.php on line 54
 

Boldog Karácsonyt!

s_volenszki · 2009. Dec. 23. (Sze), 13.20
Boldog Karácsonyt mindenkinek!

s_volenszki