不能确定这段代码在Framework 上如何工作
Jun 23, 2016 pm 02:12 PM
php html framework
多谢诸位。新到公司, 在Framework MVC 上看到如下代码,看不大懂是不是php,是如何工作的,请教一下。
page.header.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head> <title>{C::$DOMAIN} - {$config.title}</title> <link rel="stylesheet" type="text/css" href="{$CSS_URL}" /> <script src="{$JS_URL}"></script> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> {if ($debug)} <div id="debug"> <div id="debug_menu"> <a href="#" id="sql_button">SQL ({count($sql_log)})</a> <a href="#" id="dump_button">DUMP ({count($dump)})</a> <a href="#" id="profile_button">Profile ({$profile.time})</a> </div> <div class="profile_record"> Time: {$profile.time} sec.<br> Memory: {$profile.memory} bytes </div> {foreach name=dump from=$dump item=item} <div class="dump_record{if ($smarty.foreach.dump.index % 2)} odd{/if}">Dump: {$item.file}:{$item.line}<br>{$item.dump|nl2br}</div> {/foreach} {foreach name=sql_log from=$sql_log item=item} <div class="sql_record{if ($smarty.foreach.sql_log.index % 2)} odd{/if}">Time {$item.time}, {$item.records} records: <br> {$item.query|nl2br}{if ($item.data)} <br><br>{var_dump($item.data)|escape}{/if}</div> {/foreach} </div> {/if} <div class="pageTitle"><h1 id="XYZ-nbsp-nbsp-config-title">XYZ - {$config.title}</h1></div> <div class="page" id="{$config.name}"> <div class="pageHeader"> <a name="top"></a> <a href=/><div class="logo"></div></a> {if ($user->logged())} <iframe id="iframefix" src="#" frameborder="0" scrolling="no"></iframe> <div class="menu"> <ul class="dropdown"> <li class="left"> <a href="{$ROOT_URL}/">Home</a> </li> {if ($user->can_page('users|edituser|editrole'))} <li class="left"> <a href="javascript:void(0)">Users</a> <ul class="sub_menu"> {if ($user->can_page('users'))} <li><a href="{$ROOT_URL}/users.html">Users and Roles</a></li> {/if} {if ($user->can_page('edituser'))} <li><a href="{$ROOT_URL}/edituser.html">Add User</a></li> {/if} {if ($user->can_page('editrole'))} <li><a href="{$ROOT_URL}/editrole.html">Add Role</a></li> {/if} </ul> </li> {/if} {if ($user->can_page('warnings'))} <li class="left" style="background: red"> {if ($user->can_page('warnings'))} <a href="{$ROOT_URL}/warnings.html">Warnings</a> {/if} </li> {/if} {if ($user->can_page('signal_monitoring'))} <li class="left"> {if ($user->can_page('signal_monitoring_map'))} <a href="{$ROOT_URL}/signal_monitoring_map.html">Signal Monitoring</a> {/if} </li> {/if} <li class="right"> <a href="{$ROOT_URL}/login.html?adminloginform__logout=1">Logout ({$user->getLogin()})</a> </li> <li class="right"> <a href="#"> Help </a> <ul class="sub_menu"> {if ($user->can_page('faq'))} <li><a href="{$ROOT_URL}/faq.html">FAQ</a></li> {/if} {if ($user->can_page('editrole'))} <li><a href="{$ROOT_URL}/bandwidth.html">Bandwidth calculator</a></li> {/if} </ul> </li> </ul> {/if} </div> </div> <div class="pageContents"> <div class="contents"> {if ($message_success)} <div class="message_success">{$message_success}</div> {/if}
로그인 후 복사
page.footer.html
</div> <!-- /contents --> </div> <!-- /wrapper --> <div class=footer> Bell ExpressVu (c) </div></body></html>
로그인 후 복사
回复讨论(解决方案)
应该不是HTML吧,HTML应该不支持
{if ($condition)}.............{/if}
{foreach name=sql_log from=$sql_log item=item}................{/foreach}
应该是 PHP,我猜 "!=" 也能工作,但不知为什么能这么写,同问!
smarty 模版!!
参考smarty手册!
http://www.smarty.net/
Smarty3 手册
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

인기 기사
스플릿 소설을이기는 데 얼마나 걸립니까?
3 몇 주 전
By DDD
Repo : 팀원을 부활시키는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
헬로 키티 아일랜드 어드벤처 : 거대한 씨앗을 얻는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
1 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌

인기 기사
스플릿 소설을이기는 데 얼마나 걸립니까?
3 몇 주 전
By DDD
Repo : 팀원을 부활시키는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
헬로 키티 아일랜드 어드벤처 : 거대한 씨앗을 얻는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
1 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제
Gmail 이메일의 로그인 입구는 어디에 있나요?
7281
9


자바 튜토리얼
1622
14


Cakephp 튜토리얼
1341
46


라라벨 튜토리얼
1258
25


PHP 튜토리얼
1205
29



Laravel Back End : Part 2, React가있는 React 앱 구축

PHP의 컬 : REST API에서 PHP Curl Extension 사용 방법
