• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 01: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.