All pastes #462054 Raw Edit

Unnamed

public php v1 · immutable
#462054 ·published 2007-04-28 00:50 UTC
rendered paste body
This is what I currently have at the very beginning of my header page. Works for my index page, being called with index.php?lang=english. But it seems that I am not setting the session properly as the errors below display when I choose something else from my menu.<?php	session_start();		//make sure that we have a language selected by using session .. 	  if (!isset($_SESSION['lang'])) { 	  /* you can either show error message and terminate script 	    die('No language was selected! please go back and choose a langauge!');*/ 	  //or set a default language 	    $_SESSION['lang'] = $_GET['lang']; 	  } //always do this$lang = $_SESSION['lang']; 	//directory name 	  $dir = 'languages'; 		include_once($dir.$lang);?>Warning: include_once(languages/.inc) [function.include-once]: failed to open stream: No such file or directory in /home/boateco/public_html/includes/header.php on line 26Warning: include_once() [function.include]: Failed opening 'languages/.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/boateco/public_html/includes/header.php on line 26I seem to be missing that point on something.