Zend Framework 표준에 따라 Zend_Layout을 사용하고 있습니다. 여기Zend layout.html 출력의 줄 바꿈과 흰색 선
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
layout.phtml의 상황이다 : 그것은 여기
있어
zf create project demo
cd demo
zf enable layout
내 설정이다
<?= $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?= $this->headMeta(); ?>
<?= $this->headTitle(); ?>
</head>
출력 :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Dashboard</title> </head>
내 문제는 모든 줄 바꿈과 흰색 선이 제거됩니다. 어떻게 돌려받을 수 있을까요?
그러나 "echo $ this-> layout() -> content"의 출력은 괜찮습니다 (줄 바꿈과 흰색 줄이 여전히 있음).
귀하의 경우에는 Zend 나 PHP에 의해 삭제되지 않습니다. 대부분 소스를 보는 프로그램에서 제거됩니다. 줄 바꿈을 적절하게 처리하도록 시스템을 구성하기 만하면됩니다. UNIX 또는 OSX 줄 바꿈이 있지만 Windows 편집기에서 원본을 볼 수 있습니까? – hakre
@hakre 나는 unbutu의 VIM에 소스를 보았습니다. – Lance