mirror of
https://github.com/bcit-ci/CodeIgniter.git
synced 2025-02-20 11:13:29 +08:00
added chdir() code to allow scripts with relative include links to work properly
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user