This code is not working not only this but when ever i use the this->load->library('email') or something its showing error as
"message": "Undefined property: App\\Controllers\\Epicureser1::$load",
this is the code which i used currently
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 100;
$config['max_width'] = 1024;
$config['max_height'] = 768;
$this->load->library('upload',$config);
The code your are showing there is not a part of Codeigniter 4 but Codeigniter 3.
That was the old way of uploading a file. If uploading a file is what you are trying to achived that can be done by using the IncomingRequest Class.
That is not really a Library. If by any chance what you're looking for is how to load libraries in Codeigniter 4, that is actually pretty easy. Let's say you want to use the Email Library.
First you should configure your email settings on app/Config/Email.php
To send an email your just need to access the email service:
Now let's say what you want is to create a custom library, for that you should create your class inside your app/Libraries folder.
Now to load this library so you can use it's functions you should do the following.
Like Vilar said in one of his comments: