Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8736979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:25:04+00:00 2026-06-13T10:25:04+00:00

CodeIgniter – I have a public function in a controller but I don’t want

  • 0

CodeIgniter – I have a public function in a controller but I don’t want people requesting it via a URL.

i.e., I have this:

public function process_images($images) {
  ...
}

Which I need to be public because I am using GroceryCRUD and using a callback – setting it to protected means that GroceryCRUD won’t call it using its callback.

So it looks like it has to be public. How do I declare it public but make sure that CodeIgniter doesn’t call it from a URL request (i.e., if I went to http://site.com/images/process_images/test.jp it wouldn’t call ::process_images('test.jpg'))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:25:05+00:00Added an answer on June 13, 2026 at 10:25 am

    You can use underscore prefix:

    public function _process_images($images) { ... }
    

    This way it can remain public and codeigniter won’t call it on an URL request.

    Documented here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In CodeIgniter I'm using a base CRUD My_model , but I have this small
Using Codeigniter, I have a controller function name search that takes in parameters state
In Kohana/CodeIgniter, I can have a URL in this form: http://www.name.tld/controller_name/method_name/parameter_1/parameter_2/parameter_3 ... And then
In CodeIgniter I would do: print_r ($this->db->queries); In Yii I tried: print_r (Yii::app()->db) But
Using codeigniter 2.1.2, I have a form view loaded through a controller that takes
CodeIgniter has a method $this->load->vars($array) that is ideally used in the parent Controller to
In Codeigniter, when we use $this->load('class_name') in the controller, CI will try to create
In codeigniter I have used codeigniter form validation library in many controller, ex: -
In codeigniter I want to upload image to URL: http://example.com/uploads/temp/ when I submit the
Using Codeigniter, I'm able to create a function for user authentication. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.