[eluser]edziffel[/eluser]
When running the scaffolding helper from my browser -http://localhost/testcase/index.php/testcase/scaffolding/do_delete/1 I get:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /var/www/testcase/system/application/controllers/testcase.php:23)
Filename: scaffolding/Scaffolding.php
Line Number: 284
Saffolding starts and works up to the point of posting an entry. Even with the error the record is sent to the database.
I started having problems with scaffolding so to isolate I redid the video tutorial, after I redid a complete install of CI from a fresh download after deleting the entire previous install, up to where the scaffolding is demonstrated, this time named test case. Still having problems. Here is the code from the controller and the view, testcase.php and testcase_view.php respectively.
<?php
class Testcase extends Controller {
function Testcase()
{
parent::Controller();
$this->load->scaffolding('blog');
}
function index()
{
$data['title'] = "My blog title";
$data['heading'] = "My Blog heading";
$data['query'] = $this->db->get('blog');
$this->load->view('testcase_view', $data);
}
}
?>
last line # is 22 (anyone know how to do a screen print to the buffer in Ubuntu? I'm using gvim for an editor)
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<h1><?=$heading?></h1>
<?php foreach($query->result() as $row): ?>
<h3><?=$row->title?></h3>
<p><?=$row->body?></p>
<hr>
<?php endforeach; ?>
</body>
</html>
Last line #20
Have checked the config files, but wouldn't rule it out at this time.
Thanks ED