I did the CakePHP tutorial, but I get this
at the top and bottom. I would like to take that away.
And I have a question, when making a brand new app, do I have to deattach any css or stuff like that?
Basic DebuggingThe debug() function allows you to show the contents of a variable in a number of different ways. First, if you'd like data to be shown in an HTML-friendly way, set the second parameter to true . The function also prints out the line and file it is originating from by default.
You are getting warnings and notice just because your DEBUG is TRUE. to solve this probem. Go to config/app. php and just change true to false as done below..
TLDR:
Remove stuff from View/Layouts/default.ctp
(your default layout file)
Removing the code at the bottom:
In the View/Layouts/default.ctp
(your default layout file), there is code at the bottom that shows the sql queries. Just remove it, and you'll no longer have all that data printed at the bottom:
<?php echo $this->element('sql_dump'); ?>
(It's something that should be removed anyway if you plan on using DebugKit... which you should be planning on doing.)
Removing the style in general:
As for the style (colors...etc), if you also look in the same file, you'll see (toward the top) that it includes the generic CakePHP CSS. Just remove this line to get rid of their generic styling:
echo $this->Html->css('cake.generic');
Removing the description of CakePHP:
Same file - just remove this:
<div id="header">
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With