Skip to content
Advertisement

Tag: codeigniter

Call to undefined method CI_Loader::library()

When I want to submit a post a get this type of error. I try to change everything starting from database field to my view but every time when I run a code I get same error but can not see where is the problem Posts Controller Posts Model The error is in line 74, error message: Call to undefined

How to perfectly set up virtual host for codeigniter project?

I am trying to make a virtual host for a codeigniter project. I have done this in httpd-vhosts.conf: and in application/config/config.php, and the browser opens the landing page. but when transiting from any other uri it says object not found. And when i configure httpd-vhosts.conf like this: It arises problem with assets things, i,e images and some css doesnt loads.

Codeigniter session not working once controller redirect to another controller

I’ve been stuck, when I sign up and want to redirect controller to another controller for showing dashboard then that time created session does not working on redirected controller. Here is my sample code. My Sign up controller : Below is my dashboard controller Above dashboard controller doesn’t print anything. Please help me . Thanks in advance. Answer Print the

Codeigniter – My form validation callback doesn’t work

I have tried to copy from Codegniter’s documentation, but I can’t make form validation callbacks working. I added helper form, url and library form_validation. It’s not working and always returns “false” Controller View Answer Extend your form_validation library in Libraries.php MY_Form_validation.php

Codeigniter – How to fetch datatable data from ajax?

I’m working an application based on CodeIgniter. Here the code: Controller: Model: View: Javascript: Above code work well. Now, I want to fetch data into the table id=”parameter” via ajax request. I’ve create an ajax request from url, lets say from here http://’+host+path+’/action/ambil, where var path = window.location.pathname; and var host = window.location.hostname;. The ajax response produce: Question How to

codeigniter encryption / decryption function returns empty string

I am trying to login using codeigniter, but not able to do so. Then i tried to copy password from DB and pass it to dycription->decode() function, and it’s returning empty string. Here is the code output was: string(0) “” And this code also returning empty strings What i am doing wrong here? UPDATE: i tried encrypting a string and

Modify uploaded file name with Codeigniter – String manipulation

I upload image files with codeigniter to my website using: and getting the filename in this way: I want to change this filename adding “_thumb” before extension and after the name. Like ‘sda8sda8fa8f9.jpg’ to ‘sda8sda8fa8f9_thumb.jpg’. Since I need to keep hashed name, what is the simpliest way to do this? Answer When configuring CI’s file uploader, you can pass a

Advertisement