을 편집하여 케이크 틀에 로고를 추가, 그럼 내가 비싼 모두 자원을 HTML 헬퍼입니다 사용하여 실제 이미지 파일 자체내가 이미지에 대한 코드를 배치해야합니까 default.ctp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $html->charset(); ?>
<title>
<?php __('neigh*borrow'); ?>
<?php echo $title_for_layout; ?>
</title>
<?php
echo $html->meta('icon');
echo $html->css('cake.generic');
echo $scripts_for_layout;
?>
</head>
<body>
<div id="container">
<div id="header">
<h1><?php echo $html->link(__('neigh*borrow, the communty for borrowing things you need when you need them. NYU students interested in participating in the BETA should enter an item they would like to borrow along with their .NYU.EDU email address. ', true), 'http://cakephp.org'); ?></h1>
</div>
<div id="content">
<?php $session->flash(); ?>
<?php echo $content_for_layout; ?>
</div>
<div id="footer">
<?php echo $html->link(
$html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
array('target'=>'_blank'), null, false
);
?>
</div>
</div>
<?php echo $cakeDebug; ?>
</body>
</html>
내가 html로 작성한 경우에도 - 이미지를 넣을 곳은 어디입니까 ... 케이크의 "이미지"는 무엇입니까? – adam
webroot/images 디렉토리에서. – metrobalderas
HtmlHelper는 더 비싸지 만, 다시 말하면 입력 내용을 저장하지 않는 것입니다. 요점은 당신에게 이미지에 대한 올바른 URL을 제공하는 것입니다. 하드 코딩 된 URL을 유지하기 위해 노력하십시오. 상대 URL은 레이아웃에서 작동하지 않으며 다른 컴퓨터에 배포 한 경우 절대 URL이 깨질 수 있습니다. 최소한 Webroot 디렉토리에 정의 된 상수를 사용해야 만합니다. 그런 다음 HtmlHelper를 사용하여 결과 HTML/PHP 코드를 피할 수 있습니다. 속도에 대해 염려하는 경우 적절한 캐싱을 조사하십시오. – deceze