1.1 download and install Codeigniter
webpage
main configuration
CI4 has been already an application before and can be nested into the htdocs of XAMPP.
And there are TWO values necessarily modified.
Then the configuration of server:
apache2/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
//make it uncommented
htaccess
<Directory "/opt/lamp/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
if localhost/ci_project doesn’t work ,the solution below will be applied.
apache/phpini
(append)
extension = intl;
URL without public folder can work!
a dependency manager of php
command:
composer create-project codeigniter4/appstarter project-name
A problem may be emerged due to a lack of internation implement;
solution=> delete ; from ;extension=intl in /php/php.in
(official description )
CodeIgniter makes it simple and painless to set Environment Variables by using a “dotenv” file. The term comes from the file name, which starts with a dot before the text “env”.
CodeIgniter expects .env to be at the root of your project alongside the system and app directories. There is a template file distributed with CodeIgniter that’s located at the project root named env (Notice there’s no dot (.) at the start?). It has a large collection of variables your project might use that have been assigned empty, dummy, or default values. You can use this file as a starting place for your application by either renaming the template to .env, or by making a copy of it named .env.
(Attention: add . before env)
There indeed are three important points emphasised here.
CI_ENVIRONMENT = development
(the original value is production)
app.baseURL = ‘http://localhost/’
mysql parameters group
writable
some modifiable files like session ,cache or files stored in the server.
vendor
public
it’s like a entry of codeigniter ???set up running environment and launch the default index webpage.
Reference:
1.[extremely recommend]
Alex Lancer —youtube