Home > Backend Development > PHP Tutorial > CodeIgniter framework installation

CodeIgniter framework installation

WBOY
Release: 2016-07-29 09:15:37
Original
1533 people have browsed it
Installation instructions Install CodeIgniter through the following four steps:
  • Unzip the installation package;
  • Upload the CodeIgniter folder and the files inside to the server. Usually the index.php file will be located in the root directory of the website;
  • Use Open the application/config/config.php file in a text editor and set the root URL of your website. If you want to use encryption or sessions, set your encryption key here;
  • If you plan to use a database, open application/config/ The database.php file sets database parameters.
  • If you want to increase security by hiding the file location of CodeIgniter, you can change the system and application directories to other names, then open the index.php file in the home directory and set the $system_path and $application_folder variables Name modified for you. For better security, both system and application directories should be placed outside the web root directory so that they cannot be accessed directly through the browser. CodeIgniter includes a .htaccess file in each directory by default to prevent direct access, but it is best to move them out of a publicly accessible location in case the web server configuration changes or the .htaccess file is not supported. If you want the views directory to remain public, you can also move your views directory out of the application directory. After moving the directory, open the index.php file and set the values ​​of the three variables $system_path, $application_folder and $view_folder respectively. It is best to set them to absolute paths, for example: '/www/MyUser/system'. An extra step is required in a production environment, which is to disable PHP error reporting and all other features that are only used in a development environment. In CodeIgniter, you can do this by setting the ENVIRONMENT constant, which is covered in more detail in the Security guide. The above is the entire installation process!

    Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

    The above introduces the installation of the CodeIgniter framework, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template