Welcome Guest, Not a member yet? Register   Sign In
Rather silly question - extending core library
#1

Hi everyone, 
I tho up to now I know codeigniter very well ... well - I don't. 
I have some CMS system build using CI2.0 + DataMapper (I know, I know - but I'm just employee) and trying to add some function to Upload library, so I can do:

PHP Code:
$this->upload->something($some_data); 

however adding in core folder MY_Upload that extends CI_Upload, throws an error. 
Is it possible in CI to extend Upload this way ?
Thanks - Matt.
Reply
#2

Have a look at this:
https://www.codeigniter.com/userguide3/g...aries.html
Reply
#3

Are you adding MY_Upload.php to /application/core/ or to system/core/?

It should be the former. Also check config.php and confirm that

PHP Code:
$config['subclass_prefix'] = 'MY_; 
Reply
#4

The upload class isn't a core file. It doesn't belong in core, it belongs in libraries.
Reply
#5

(06-12-2018, 12:26 PM)skunkbad Wrote: The upload class isn't a core file. It doesn't belong in core, it belongs in libraries.

Well, ya. There is that. Confused
Reply




Theme © iAndrew 2016 - Forum software by © MyBB