To prevent direct access to a controller's method in CodeIgniter, prefix the method name with ________.

  • private
  • public
  • secret
  • underscore
To prevent direct access, prefix the method name with an underscore (_). CodeIgniter considers methods with an underscore as private, making them inaccessible via a URL. This enhances security by restricting direct access to internal methods.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *