Skip to content
Advertisement

Tag: codeigniter-3

Why can’t I export MySQL table values as a CSV file in this Codeigniter application?

I have been developing a blogging application with CodeIgniter 3.1.8 and Twig. The application has a newsletter subscription system. I make use of a table named newsletter with 3 columns: id, email and subscription_date. In the class Subscribers controller, I have created an export() method intend to export subscribers as a CSV file: In the Newsletter_model model: The export form:

Unlink file – path issue – Codeigniter

Apparently, I am confused how to use site_url() while deleting a file. My site_url responded with http://localhost/Project/index.php For deleting a file, I use unlink command. However, How to use site_url into the unlink command in codeigniter. I am surprised! Below is the path where the uploaded files get stored! I have used the following: Message: unlink(C:/xampp/htdocs/NetSach/assets/images/sweepers cartoon.jpg): No such file

Printing a nested array on View | Codeigniter

I’m building a cart using sessions, I’m adding each pizza to an array and passing to the session. The array is as follows, I was able to display the item id, pizza name, price, and quantity But cannot figure out to display the topping names user has selected in the Toppings column.How should I do this> View The following code

Advertisement