added chdir() code to allow scripts with relative include links to work properly

World Wide Web Server 2012-07-04 16:05:03 -07:00
parent 4fbfb0abeb
commit d85446a3ca

@ -50,7 +50,11 @@ class Site_migrate_base extends Controller {
$view_file = strtok($local_view_path, '?');
// append the default_view string if ruri targets a directory
$view_file = (is_dir(APPPATH.'views/'.$view_file)) ? $view_file.'/'.$this->default_view_and_method : $view_file;
// change the current working directory
// to support relative include/require paths
chdir(dirname($view_file));
$this->load->view($view_file);
chdir(FCPATH);
}
}