Questions tagged [codeigniter]
CodeIgniter is an open-source PHP web development framework created by EllisLab Inc and it has been adopted by British Columbia Institute of Technology. The framework implements a modified version of the Model-View-Controller design pattern. Use this tag for questions about CodeIgniter classes, methods, functions, syntax and use.
42 questions
-1
votes
1
answer
108
views
Ideas For Sending Messages from Contact Us Page in Website as a Notification Email to an Administrator
What is the best way to send messages from a Contact Us page in a website as a notification email to an administrator ?
So far, this is what I did but I feel like this is not really the proper way.
I ...
3
votes
2
answers
2k
views
Should on each test create and nuke a testing database?
In my case I inherited a poorly engineered code, on that piece of code I have been tasked to increase the code coverage in integration tests. But instead of the usual pattern:
Create/Populate a test ...
1
vote
1
answer
1k
views
How to setup REST API in Codeigniter 3.0
I am creating the REST API using codeigniter. I downloaded this library and installed in my application. It works great! https://github.com/chriskacerguis/codeigniter-restserver
But I have an doubt. ...
3
votes
0
answers
80
views
How to best approach adding a new template to an existing CodeIgniter project?
I am trying to add a new template to an existing CodeIgniter 3.0 project where the original developer had not planned for additional templates/themes.
The primary objectives are to:
a) make a usable ...
-2
votes
1
answer
8k
views
How can I do to use Angular 5/6 for frontend and Codeigniter 3 for backend in the same web app?
I have this project I want to do, using Angular 5/6 for frontend and Codeigniter 3 for backend. The problem is that I don't know how to combine the two, and all the tutorials I looked were using ...
1
vote
0
answers
4k
views
Is this Codeigniter HMVC folder structure good practice?
The web App has four distinct user areas.
The frontend for people off the street
The user area for logged in users
A teacher zone
An Admin c-panel
I am using CodeIgniter with the HMVC extension.
Here ...
1
vote
3
answers
315
views
Secure REST APIs
I am building Rest APIs for an iPhone app using the PHP framework CodeIgniter. Please let me know how I can ensure that the API is accessible via the app only. This means that if anyone wants to ...
0
votes
1
answer
404
views
Script to protect code duplication [duplicate]
I want to sell my source code, it's written in PHP and CodeIgniter. And it's actually a CMS for personal website.
My intention is to create only one license for one use only, if someone buy this code ...
0
votes
1
answer
5k
views
Is it always better to use __construct() in CodeIgniter's Models and Views, even if it's not needed? [closed]
Sometimes we have Models and Controllers where the function __construct() just doesn't do anything, but is sitting on the top of all the methods in CodeIgniter's models and controllers. A lot of ...
0
votes
0
answers
73
views
What happens to super handler with instance variables
What will happen if I extend a class A to a controller B, when A has instance variables (private, protected)?
I have a main controller MY_Controller(handler) which has several methods: can_modify (...
-1
votes
1
answer
398
views
What might be a good way to get hands on experience with Object Oriented PHP [closed]
I am a Computer Science student. I took a course on OOP, and I understand the concepts (classes, extending, encapsulation, etc). I'm also a web developer, have been doing it for about three years; I'...
0
votes
1
answer
111
views
Secure Form Submission
This is probably a no brainer, but I've not been able to find an answer that is definitive.
I have a Codeigniter site running on Apache with mod_rewrite (to get rid of index.php) and mod_ssl for ...
0
votes
1
answer
5k
views
Reporting Solution in PHP / CodeIgniter - Server side logic vs client side
I'm building a report for an end user.
They would like to see a list of all widgets... but then also like to see widgets with missing attributes, like missing names, or missing size.
So i was ...
0
votes
1
answer
6k
views
Slower Ajax Response
Does putting the view logic inside the controller increase page load speed? Because I have a controller action calling a view which I am loading through ajax and I am getting a very slow response. Why ...
0
votes
1
answer
7k
views
Making Class Diagram for MVC Pattern Project
I have a question about making a class diagram for an MVC based college senior project.
If we have 2 actors of users in my system, lets say Undergrad and Graduate students are the children of ...
1
vote
1
answer
193
views
Helper functions - well defined inputs or well defined outputs?
Problem
In Codeigniter (PHP framework), I am trying to create a helper function that will inject an ActiveRecord (for MySQL) command into a chain of existing ActiveRecord calls. The reasoning for this ...
1
vote
2
answers
290
views
Does a group of Select Statements count as a valid model?
I'm making a facebook app and I'm trying to follow MVC properly. But I was wondering if I had a class that was a bunch of fql queries (getting data from facebook) should I have keep these in a ...
3
votes
1
answer
2k
views
Migrating Web based projects from Java to PHP
At our work place after hours of coding, testing and QA we have successfully added a couple of software tools in our product line. We specialize in web based software solutions so in order to tap on ...
4
votes
4
answers
13k
views
php templating with codeigniter
I am currently develop a website application in codeigniter, and I'd like to do something in PHP / CodeIgniter where I can make a common template for separate sections of the website. I was thinking ...
1
vote
3
answers
5k
views
Pass around record ids in the url in PHP
I'm doing a PHP application with CodeIgniter and most of my controllers accept record ids as parameters for retrieving purposes.
I also pass record ids in my forms action.
Like this: www.sample.com/...
0
votes
2
answers
383
views
What is a good technique to prevent unauthenticated users from accessing controller methods?
I have an event(s) controller:
class Event extends CI_Controller{
public function index(){
}
public function foo(){
}
//Shouldn't be able to use this method unless logged in
...
0
votes
1
answer
1k
views
Why should I use the function migration in codeigniter?
What is wrong with using database tables with phpmyadmin or mysql? What are the benefits, if I'll use 'migration'?
9
votes
2
answers
9k
views
Can REST API be used as business layer?
I am using PHP Codeigniter MVC design pattern
and I had this project with some sort of specific business processes
In my application I will be dealing with 2 existing REST APIs:
Google
Trello
I ...
4
votes
1
answer
2k
views
How to achieve N-Tier type in Codeigniter MVC [closed]
I know that N-Tier intended to separate layers on different network
but I would like to have the same code separation in codeigniter
I got this idea to have
Model : for database CRUD - > Data layer
...
4
votes
2
answers
4k
views
Codeigniter/MVC workflow
Bit of a workflow question.
I'm just staring with MVC and wondered how other people usually work in MVC? The 2 options I see is to code the model and controller completely first and then work on the ...
1
vote
0
answers
634
views
Codeigniter modular separation with Phing
I am thinking of managing a product source I am doing using Codeigniter + HMVC.
Right now my folder structure is something like this:
application
|-modules
|-module1
| |--controllers
...
6
votes
1
answer
13k
views
PHP Framework for RESTful Web Service [closed]
I have been going round in circles with this question for days - which is the best PHP framework to use to create a RESTful Web service?
I've trawled the web for info and have come across three main ...
3
votes
1
answer
4k
views
How can I profile database queries from PHP?
CodeIgniter has a very nice feature called a Profiler, which displays information at the foot of a page, information such as GET, Memory, POST data. It also shows database queries and how long they ...
1
vote
1
answer
144
views
Fitting an established site into a CI framework
I manage a rather large, feature full nightmare of a site which has no end of feature creep settings/options/etc.
Up to now its been coded in a procedural/functional way and would like to move to an ...
1
vote
1
answer
2k
views
Performing user authentication in a CodeIgniter controller constructor?
In "The Clean Code Talks -- Unit Testing", Miško Hevery mentions that "as little work as possible should be done in constructors [to make classes more easily testable]'. It got me thinking about the ...
8
votes
1
answer
11k
views
How to Properly Make use of Codeigniter's HMVC
I have been having problems wrapping my brain around how to properly utilize the modular extension for Codeigniter. From what I understand, modules should be entirely independent of one another so I ...
7
votes
2
answers
6k
views
What is the correct way to implement Auth/ACL in MVC?
I am looking into making a correctly laid out MVC Auth/ACL system. I think I want the authentication of a user (and the session handling) to be separate from the ACL system. (I don't know why but this ...
-3
votes
2
answers
16k
views
CodeIgniter routing helping
Can you explain these two lines of code in
applications/config/routes.php file in the CodeIgniter framework?
$route['default_controller'] = 'pages/view';
$route['(:any)'] = 'pages/view/$1';
14
votes
3
answers
14k
views
Models per database table?
I am using codeigniter, and have found myself in a similar situation where I have repeated Model methods.
I am creating a Model per Controller. But I would creating a Model per database table be ...
-1
votes
1
answer
856
views
Using frameworks or writing code without any framework ? Which is better for 3 months aged PHP programmer? [duplicate]
Possible Duplicate:
When do I need to use a framework?
When should I start learning a PHP Framework
I started to learn PHP about four months ago, and I have been writing some applications for ...
4
votes
3
answers
3k
views
Controllers in CodeIgniter
I little bit new to the CodeIgniter framework and this is my first project with this framework. During a chat on StackOverflow somebody said that we need to make controllers tiny as possible.
...
1
vote
4
answers
3k
views
create site with Codeigniter without database support
What approach could You suggest, If I don't have mysql or other database support on webhost, but I need to store data ( textual information ) for website somewhere. It's informative site for school - ...
2
votes
1
answer
3k
views
Is there a scalable multi-site strategy with codeigniter?
I've been looking for a efficient and secure way of enabling multi-site capabilities to codeigniter for a while.
These two(one & two) articles I found pretty interesting, but they don't seem to ...
1
vote
1
answer
1k
views
Codeigniter + JQuery + Processing.js to replace a Delphi App
So, I've got a mandate to make our aged trillion lined Delphi app web based and it needs to make heavy use of the <canvas> element (HTML5 compatibility doesn't seem to be a big issue since we ...
2
votes
2
answers
2k
views
What license is applicable for an app based on CodeIgniter?
I am trying to fork an application that is based on CodeIgniter. According to the GoogleCode page, the license is GPLv3. However, examining the license.txt file inside the root directory of the ...
1
vote
1
answer
675
views
where to get CodeIgniter views from
I just started using CodeIgniter I'm wondering if anyone knows where I can download pre-made views. For example right now I'm looking for an admin interface. I could write the code myself but I'm ...
3
votes
8
answers
3k
views
If you were to build an app like Craigslist, would use an off-the-shelf framework or write your own?
Title is the question.
And why I am asking is because from what I read about most PHP frameworks (e.g. Code Igniter, Kohana, Cake, Zend) is that they're ether too complex, or are designed mostly for ...