0

I have this simple code:

<html>
<head>
<title>My Cake Blog Application</title>
<?=$html->css('styles');?>
</head>
<body>
<div id="container">
<div id="content">
<?=$content_for_layout;?>
</div>
</div>
</body>
</html>

I saved it in app/views/layouts name it to default.ctp the output in browser only shows me css('styles');

also I have styles.css in app/webroot/css

it is not working in my browser then I tried this string for begin and close:<?php echo();?> again not worked

<html>
<head>
<title>My Cake Blog Application</title>
<?php=$html->css('styles'); echo();?>
</head>
<body>
<div id="container">
<div id="content">
<?php=$content_for_layout; echo();?>
</div>
</div>
</body>
</html>
Nickool
  • 3,662
  • 10
  • 42
  • 72

2 Answers2

0
<html>
<head>
<title>My Cake Blog Application</title>
<?php echo $html->css('styles'); ?>
</head>
<body>
<div id="container">
<div id="content">
<?php echo $content_for_layout; ?>
</div>
</div>
</body>
</html>
Nickool
  • 3,662
  • 10
  • 42
  • 72
0

Either use full tags as you already found out or enable short tags in php.ini: How to enable PHP short tags?

Community
  • 1
  • 1
JJJ
  • 32,902
  • 20
  • 89
  • 102