아키텍처 MVC에서 내 콘텐츠를 표시하는 가장 좋은 방법은 무엇입니까? 이것은mvc로 메뉴를 표시하는 가장 좋은 방법은 무엇입니까?
<?php
class view {
function __construct(){
}
function __set($var,$value){
$this->var = $value;
}
function __get($var){
return $this->var;
}
function render($render, $noinclude = false){
if($noinclude == true){
require ("view/template/".$render.".php");
}
else{
require ("view/template/headerTPL.html");
require ("view/template/bannerTPL.html");
require ("view/template/menuTPL.html");
require ("view/template/".$render.".php");
require ("view/template/footerTPL.html");
}
}
function show($value){
$this->value = $value;
}
function alert($value){
echo "<script>alert('{$value}')</script>";
}
}
?>
<div id="conteudo">
<?php require $this->menu; ?>
</div>
내 render.php/\
는 TPL을 포함하는 것이 잘못인가 : 사실 나는 다음과 같은 방법으로하고 있어요? 어떻게해야합니까?
이미 http://stackoverflow.com/questions/9780247/mvc-problems-problems-with-views 및 http://stackoverflow.com/questions/9760250/how-the-bestway- to-make-a-menu-with-php-mvc .. 스팸 차단. –
오, 미안하지만이 주제를 더 이상 보지 못했습니다. u – user1258260
모두에게 감사드립니다. http://stackoverflow.com/users/1258260/user1258260?tab=questions –