• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about controller[SOLVED]

#1
[eluser]Hitesh Chavda[/eluser]
Hi

I have little question about controller in CI

I have function some like below in main controller
Code:
function check_user_name()
{

     //code

}

now when i type http://localhost/check_user_name/ it execute, I know the work of controller but how to block only that function to behave only like function rather than url.

I know this type of functions should actually write in Models but now I can't move it.

#2
[eluser]pistolPete[/eluser]
User guide:

Quote:In some cases you may want certain functions hidden from public access. To make a function private, simply add an underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:

Code:
function _utility()
{
  // some code
}

#3
[eluser]Hitesh Chavda[/eluser]
Thank you very very much...

#4
[eluser]alboyd[/eluser]
PistolPete - Well done! Your ability to understand the question astounded me. GW Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.