Fatal error: Call to undefined function db_clean() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Fatal error: Call to undefined function db_clean() (/showthread.php?tid=19847) Pages:
1
2
|
Fatal error: Call to undefined function db_clean() - El Forum - 06-20-2009 [eluser]arjo[/eluser] Hi, I am trying to split the admin part from Claudia's kids sample shop to get to know CodeIgniter. I am getting along just fine so far but the function db_clean() causes a fatal error. I can leave it out but from safety point of view I would like to keep it in. Here is a piece of code, placed in application\models\madmins.php where the function db_clean is used: Code: function addUser() Does anyone have a clue what is going on? I am using the same libraries that are used in the sample. And the original sample is working fine on the same webserver and mysql server. Is it a setting somewhere to enable the function? Can't wait... Thanx Arjo Fatal error: Call to undefined function db_clean() - El Forum - 06-20-2009 [eluser]arjo[/eluser] Found the problem, I was missing the file claudiaskids\shopping\system\application\helpers\MY_security_helper.php content: Code: <?php Fatal error: Call to undefined function db_clean() - El Forum - 01-21-2010 [eluser]maria clara[/eluser] hi, may i ask a question?? what does your “db_clean” stands for?? because i have this script. Code: $fields = array( and the db_clean() got me an error in my console. Quote:<br />i'm new to this function..can you please explain to me the function.. thanks in advance, maria Fatal error: Call to undefined function db_clean() - El Forum - 01-22-2010 [eluser]arjo[/eluser] you need the function db_clean wich is in the file system\application\helpers\MY_security_helper.php if you don't have the file, this is the content: Code: <?php As you can see, db_clean is a function. It calls another function namely xss_clean. This function cleans up your data that you submit to the function. So the function db_clean is for cleaning up your data you are storing in a database. greetz Arjo Fatal error: Call to undefined function db_clean() - El Forum - 01-24-2010 [eluser]maria clara[/eluser] i have solved it already. thanks for your reply. cheers, kahtrina Fatal error: Call to undefined function db_clean() - El Forum - 08-20-2012 [eluser]mact1079[/eluser] I am still receiving the "Fatal error: Call to undefined function db_clean()" after putting in MY_security_helper.php. Any idea why? This my model code. Code: class Admins_model extends CI_Model{ I tried adding also loading the helper with Code: function Admins_model(){ but I receive error "Unable to load the requested file: helpers/my_security_helper.php" Fatal error: Call to undefined function db_clean() - El Forum - 08-20-2012 [eluser]TWP Marketing[/eluser] mact1079 Did you also create the helper file my_security_helper.php as shown in the prior post? Fatal error: Call to undefined function db_clean() - El Forum - 08-20-2012 [eluser]mact1079[/eluser] Yes I have CIapplication/helpers/MY_security_helper.php with below Code: <?php Fatal error: Call to undefined function db_clean() - El Forum - 08-20-2012 [eluser]TWP Marketing[/eluser] Did you load the helper library too, in your controller $this->load->helper('security_helper'); Fatal error: Call to undefined function db_clean() - El Forum - 08-20-2012 [eluser]mact1079[/eluser] Seems like that was the issue. I was loading it with $this->load->helper(‘MY_security_helper’) not $this->load->helper('security_helper'); Thanks for pointing that out! |