• Is there any difference using
    get_header()
    or
    include(TEMPLATEPATH . ‘/header.php’)?

    I want to use a redirection to the good header.php page depending on the browser language using:

    <?php
    if (!isset($langue_user) && !isset($_SESSION["ch_langue"])){
    $langue_user=substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
    	switch($langue_user){	
    
    	case "en":
    	$_SESSION["ch_langue"] = "en";
    	break;
    
    	default:
    	$_SESSION["ch_langue"] = "fr";
    	break;
    	}
    }
    ?>

    Any advice to do that properly?

  • The topic ‘difference between get_header() or include(TEMPLATEPATH . ‘/header.php’)?’ is closed to new replies.