If you want to implement conditional code based on the class or method, you need to get current class and method name in CodeIgniter. Using the Router Class in CodeIgniter, you can easily get the current controller and method name. The Router class helps to parses URIs and determines routing.

By: CodexWorld Apr 25, 2018

Use of undefined constant VIEWPATH issue occurs when you upgrade your existing CodeIgniter application version to CodeIgniter 3.x. The undefined constant viewpath issue can be easily solved by the following solution. Open the root’s index.php file and specify the view directory to solve this issue.

By: CodexWorld Jul 19, 2017

CodeIgniter uses the segment-based approach to design URLs human-friendly or seo-friendly. By default, the index.php file will be included with the URLs in CodeIgniter. But you can easily remove the index.php from the URL using .htaccess.

By: CodexWorld Mar 13, 2017

PHP date_default_timezone_set() function is used to sets the default timezone used by all date or time functions. In CodeIgniter, the best place to set the timezone is index.php file of application root. Place the date_default_timezone_set() with your desired timezone in the main index.php file of your application.

By: CodexWorld Feb 25, 2016

Universal Unique Identifier (UUID) in MySQL is used as row identity value (PRIMARY KEY). If you are working with CodeIgniter and want to insert UUID as row PRIMARY KEY, use this sample code to insert UUID as PRIMARY KEY into MySQL table in CodeIgniter.

By: CodexWorld Jan 21, 2016

Are you getting filetype is not allowed error? At the time of uploading doc or docx files with CodeIgniter upload library. You can easily fix this error by modifying mimes.php file in CodeIgniter. Change doc and docx mime types for solve the CodeIgniter doc and docx upload problem.

By: CodexWorld Jan 17, 2016
keyboard_double_arrow_up