에 전역 변수를 할당이 내 인덱스 :내가 헤더 파일</p> <p>에 던져 클래스 코드를 생성 제목을 통과해야 인덱스
require('files/inc/config.php');
require('files/assets/php/header.php');
require('files/libs/Plantilla.class.php');
$plantilla = new plantilla($serv,$user,$pass,$base,$url,$sitio);
$pagina = empty($_GET['pagina']) ? "inicio" : $general->limpiar($_GET['pagina']);
switch ($pagina) {
case 'blog':
$ids = $plantilla->docs($month,$view,$ref,$titles);
$ref = $_GET['ref'];
$month = $_GET['month'];
$view = $_GET['view'];
$titles = $_GET['titles'];
echo $ids[0];
$tsTitle = $ids[1];
break;
default:
echo $plantilla->docs($month,$view,$ref,$titles);
$ref = $_GET['ref'];
$month = $_GET['month'];
$view = $_GET['view'];
$titles = $_GET['titles'];
break;
}
require('files/assets/php/footer.php');
변수 $ tsTitle가 header.php에 표시됩니다 및
<?php
$titulo = $tsTitle;
?>
<!doctype HTML>
<html lang="es">
<head>
<title><?php echo $titulo;?></title>
내 문제를 내가 두 파일에 표시 할 수있는 방법 footer.php 에 $ tsTitle 만 표시됩니다 footer.php?
케이스 안에 vale을 지정하십시오. $ tsTitle = $ ids [1]; 빈하지 않은
감사합니다. –