Welcome Guest, Not a member yet? Register   Sign In
PHP8 problems
#1

Hi, im using ci4 and working well other php versions but i have problem with php8.
first problems solved with here: https://forum.codeigniter.com/thread-78146.html
and now my route not working. 
PHP Code:
$routes->get('/''IndexController::index'); 

and getting this error: Controller method is not found: index
so if i do my index function static route working like this. But i cant all functions to static please help.
PHP Code:
<?php namespace App\Controllers;
class 
IndexController extends BaseController
{
  public function __construct(){
    var_dump("TEST");
  }
public static function 
index()
{
return 
view('welcome_message');
}
//--------------------------------------------------------------------


Reply
#2

i just deleted xampp and loaded 7.4php version.
Reply
#3

Because PHP 8.0.0 is not yet compatible with CodeIgniter 4. Switch to PHP 7.4.13.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB