[eluser]mlieshout[/eluser]
I trying to migrate a rather complex old-fashion php/html site to CI using your site_migrate solution. I’ve put the old site in the views/site_migrate directory and this works.
What I want to do now is to migrate the site page-by-page to the MVC structure.
Somehow, I don’t follow the site_migrate steps as I can only do this by adding the new pages to the site_migrate controller.
What if I want to convert a page from the old site into its own controller and use subdirs in the views.
I.e.:
A page products.php in the old style should become:
controller/products.php
Code:
<?php
class Products extends Controller {
function Products()
{
parent::Controller();
}
function index()
{
$data[‘title’] = “title”;
$this->load->view(‘products/index.php’, $data);
}
}
This is the view in views/products/index.php
Code:
<?php
$this->load->view(‘common/header’,$title);
?>
<div id=“mainWrapper”>
<div id=“main”>
testtest
</div>
</div> <!—mainWrapper—>
<?php
$this->load->view(‘common/footer’);
?>
But I keep getting these errors:
Quote:A PHP Error was encountered
Severity: Warning
Message: chdir() [function.chdir]: No such file or directory (errno 2)
Filename: controllers/site_migrate_base.php
Line Number: 53
Any idea what might go wrong?