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

[eluser]Hitesh Chavda[/eluser]

I have little question about controller in CI

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



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.

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:

function _utility()
  // some code

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

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-2021 MyBB Group.