Welcome Guest, Not a member yet? Register   Sign In
Upgrade from CI3 to CI4 - By Running them together
#8

(04-15-2024, 01:26 AM)win123139 Wrote:
(04-14-2024, 11:54 PM)mkganesh Wrote:
(04-14-2024, 08:29 PM)win123139 Wrote: what about router ? how run router CI3 and CI4 in the same project

No Changes in CI3 Routing.

CI4 add the route like

$routes->get('welcome/index', 'Home::index');

And in CI3 welcome controller, index function comment all the lines of code and add $this->load_from_ci4();

This should load the CI4 Home controller, index function
thank you for quick reply but i'm confusing about step 6
where should this code be placed and why load_from_ci4 fuction define'FCPATH' FCPATH_CI3
public function load_from_ci4() {
// Path to the front controller (this file)
define FCPATH_CI3

Which Code?

The load_from_ci4 function mostly has the content of CI4's public/index.php file, except for few lines which are already set in CI3's index.php file.
FCPATH needs to point to the location of index file, which is already set in FCPATH_CI3.
Reply


Messages In This Thread
RE: Upgrade from CI3 to CI4 - By Running them together - by mkganesh - 04-15-2024, 03:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB