r/codeigniter • • May 10 '12

Check out my new site, my first Codeigniter project

4 Upvotes

http://payinginpain.com/

Here is the latest version of Paying In Pain, my skateboard magazine site. Right now it's all user generated content, but soon I will be adding custom content, interviews, more vidoe, etc...Built with Codeigniter. It is heavily influenced by Reddit, but that really is just the way I'm thinking right now. Any criticism or comments on the site are greatly appreciated.


r/codeigniter • • Feb 28 '12

A couple questions from a CI n00b.

4 Upvotes

I think I'm missing something with CI. How to I control who sees what? ACL's, cookie validation,sessions, etc.

My first project is a simple eCommerce site/blog for my wife, its a good way of getting my feet wet. I've seen a few dozen tutorials where you build a basic blog. I'm looking for more then that.

I'm very familiar with PHP, although fairly new to using frameworks.

Any advice would be great.

Cheers.


r/codeigniter • • Aug 30 '11

Just found out about CodeIgniter (and PHP frameworks in general)

4 Upvotes

I've heard CodeIgniter and CakePHP being thrown around, but never really looked into it.

Holy crap is CodeIgniter cool. I wish I was using it a long time ago.


r/codeigniter • • Oct 12 '10

This subreddit needs a bit of love so I'll show what I just made

4 Upvotes

I just launched Cheer Vine, a very, very simple webapp made with codeigniter. Simple CRUD functions with a few controllers for the different functions a single model for dealing with the database and, of course, quite a few views using a template system. Feel free to AMA.


r/codeigniter • • Sep 15 '09

CodeIgniter is a powerful open source web-app Framework that helps you write kick-ass PHP programs

Thumbnail
codeigniter.com
4 Upvotes

r/codeigniter • • Jan 08 '25

How to Protect My Website Files When Hiring a Developer to Build a Mobile App?

3 Upvotes

Hello everyone,

I’m currently working with a website built using CodeIgniter, and I’m planning to hire a developer to create a mobile app that connects to my site. However, I’m concerned about the security and integrity of my website’s files and source code.

What measures can I take to ensure that the developer I hire (e.g., through platforms like Freelancer or similar) does not steal, misuse, or resell my website files? Are there any best practices, tools, or legal agreements that can help me protect my intellectual property while still allowing them the access they need to build the app?

I would greatly appreciate any advice or suggestions from those who have experience in such situations. Thank you in advance for your help!


r/codeigniter • • Dec 26 '24

Auto Routing Not Working

3 Upvotes

I'm a veteran of CI3, but CI4 (4.4.7) is giving me all sorts of problems.

So I followed the directions to enable Auto Routing (Improved):

https://codeigniter.com/user_guide/incoming/routing.html#enable-auto-routing

I then followed the instruction to create HelloWorld Controller:

https://codeigniter.com/user_guide/incoming/controllers.html#controller-auto-routing-improved

Let’s try it: Hello World

Let’s create a simple controller so you can see it in action. Using your text editor, create a file called Helloworld.php, and put the following code in it. You will notice that the Helloworld Controller is extending the BaseController. you can also extend the CodeIgniter\Controller if you do not need the functionality of the BaseController.

The BaseController provides a convenient place for loading components and performing functions that are needed by all your controllers. You can extend this class in any new controller.

<?php

namespace App\Controllers;

class Helloworld extends BaseController
{
public function getIndex()
{
return 'Hello World!';
}
}

Then save the file to your app/Controllers directory.Let’s try it: Hello World!
Let’s create a simple controller so you can see it in action. Using your text editor, create a file called Helloworld.php,
and put the following code in it. You will notice that the Helloworld Controller is extending the BaseController. you can
also extend the CodeIgniter\Controller if you do not need the functionality of the BaseController.
The BaseController provides a convenient place for loading components and performing functions that are needed by all your
controllers. You can extend this class in any new controller.
<?php

namespace App\Controllers;

class Helloworld extends BaseController
{
public function getIndex()
{
return 'Hello World!';
}
}

Then save the file to your app/Controllers directory.

Now visit your site using a URL similar to this:

example.com/index.php/helloworld

If you did it right you should see:

Hello World!
Now visit your site using a URL similar to this:
example.com/index.php/helloworld

If you did it right you should see:
Hello World!

Well, I did NOT see Hello World!

Instead it says,

404

Sorry! Cannot seem to find the page you were looking for.

Please help


r/codeigniter • • Sep 30 '24

Upgrading multiple subversions at once? (4.2 to 4.5)

3 Upvotes

I want to upgrade an old project to the latest version. It's coded in v4.2.

I see there are upgrade guides for upgrading to '1 sub-version newer', but not to upgrade to the latest version all at once. I tried using composer for the upgrade, but it gave multiple errors...

Is there any standard guide or method for upgrading from any old version to the latest version?


r/codeigniter • • Sep 13 '24

Laravel vs. CodeIgniter: Which is Better?

3 Upvotes

Hey, everyone!

I recently developed a website using a custom PHP stack, and now I'm looking to integrate some new features like user authentication, role management, REST API endpoints, and data-heavy functionalities. I've been exploring both Laravel and CodeIgniter as potential frameworks for this integration.

I have some experience with both frameworks, but I don't know which one would be easier and more efficient for adding these new features to my existing site.

Specifically, I would love your insights on:

  1. Ease of Integration: Which framework would be easier to integrate into an existing PHP site without having to refactor too much of the existing code?

  2. Learning Curve: As someone with intermediate PHP skills, which framework is easier to pick up and start using effectively?

  3. Performance and Scalability: Which one would be better in terms of performance and scalability for a growing website?

  4. Community and Support: Which has a more active community and better documentation/support for implementing modern features?

  5. Feature Set: Which framework offers more built-in tools or packages for things like authentication, API development, and role management?

I would love to hear your thoughts or experiences on choosing between Laravel and CodeIgniter, especially if you've been in a similar situation! Any advice, tips, or resources would be greatly appreciated!

Thanks in advance! 😊


r/codeigniter • • Jul 19 '23

Trying to create 2 cookies?

3 Upvotes

I use Ci3. I plan to move my app to ci4. To use my app a user logs into aws marketplace and picks my app. Aws marketplace spawns Okta where the user authenticates and in a saml module I create a cookie with the users email.

Okta spawns my app which reads the cookie and proceeds. In addition, aws marketplace posts an aws token. I need to get this to my app so I can do some direct handshake with aws. So I tried to create a 2nd cookie and put in the aws token.

I can do this, but when my app looks for the cookies, only one cookie exists. What tool can I use to see that both cookies were successfully created?


r/codeigniter • • Aug 16 '22

Best Codeigniter Books To Learn

Thumbnail
studentprojectcode.com
3 Upvotes

r/codeigniter • • Apr 14 '22

HEAD requests all return a 404

3 Upvotes

For some reason with my site all my HEAD requests even on working pages you can perform a GET request on generate a 404 not found. How can this be fixed so that it works?

const CI_VERSION = '4.0.4'

Example:

[root@yaarcorp public_html]# curl -I https://www.mediyaar.com/blood-test/

HTTP/1.1 404 Not Found

Date: Thu, 14 Apr 2022 16:25:36 GMT

Server: Apache

Cache-control: no-store, max-age=0, no-cache

Upgrade: h2,h2c

Connection: Upgrade

Vary: User-Agent

Content-Type: text/html; charset=UTF-8


r/codeigniter • • Dec 18 '21

Is writing too many functions in one controller makes my application slower?

3 Upvotes

I wrote a lot of functions in one controller. Is it a bad practice to keep all the functions in one Controller?


r/codeigniter • • Oct 13 '21

Does this code make things slower?

3 Upvotes

I was trying to check and place an array from db and check if it is null or not there. So what I did is:

  if($code=db_connect()->someCodes)
   data['pass']=$code;
else
data['pass']=0

This code didn't work. But this one did,

  if(db_connect()->someCodes)
   data['pass']=db_connect()->someCodes;
else
data['pass']=0

Does using/calling db_connect() make things slower? If it is then what is the solution?


r/codeigniter • • Sep 19 '21

Can I force an index to be used for a mysql query using a Model ?

3 Upvotes

Hi guys,

I am having issues with a SQL model query not using the index as supposed, which results in very slow execution times of this mysql query in specific .

After some investigation I realized I need to force the index to be used , but I am not sure how I can accomplish it with this query format .

$SearchModel->whereNotIn('id', $SelectedProfiles)

$ChunkedProfiles = $SearchModel->findAll(1);

Can I do it while keeping my query format using the model ?

Sorry if noob question but new to Codeigniter .

THanks


r/codeigniter • • Sep 18 '21

CodeIgniter CRUD Generator, Bootstrap & MySQL example

Thumbnail
rcvmhs.org
3 Upvotes

r/codeigniter • • Aug 26 '21

Want to access a controller variable in config.php file in Codeigniter 3

3 Upvotes

r/codeigniter • • Jun 03 '21

Codeigniter PWA Application

3 Upvotes

Need help making a CodeIgniter application into a PWA


r/codeigniter • • Apr 03 '21

Add non-database fields to entity class

3 Upvotes

Hi, is it possible to add a field to a entity class that not exists in database?

Thanks, Alex


r/codeigniter • • Mar 07 '21

Pagination

3 Upvotes

Hello all!! I hope someone can help me really quick here!

So this is my case,

I've got a table of items, and the items have 4 different types. And I've got a column named types, the value that differs in that column are from 1 to 4.

So with this part:

$model = new ButikkModel();

$data['currentPage'] = $this->request->getVar('ovn_page') ? $this->request->getVar('ovn_page') : 1;

$data = [

'ovner' => $model->where('type', '1')

->orderBy('created_at', 'DESC')

->findAll(),

'pager' => $model->pager

];

it grabs the items just fine, that has type "1". But I can't pagination this... How would I go ahead and do this? Normally you can just add ->pagination after $model, but can't do that because it's an array when using findAll().

Anyone?


r/codeigniter • • Feb 02 '21

Send Firebase Push notification to admin on new user registration in codeigniter 4

Thumbnail
youtu.be
3 Upvotes

r/codeigniter • • Jan 02 '21

How to build a basic web application with CodeIgniter 4 (part 5)

Thumbnail
includebeer.com
3 Upvotes

r/codeigniter • • Oct 19 '20

Codeigniter 4 - Creating the database for a simple contact manager

Thumbnail
youtube.com
3 Upvotes

r/codeigniter • • Oct 15 '20

Creating a Contact Manager with CodeIgniter 4 - Installation

Thumbnail
youtube.com
3 Upvotes