404 - File Not Found Codeigniter 4 |
this is one painless way to get started, which maybe needs tweaking for Windows (im on linux)
open a terminal conform where we are : Code: bash-5.0$ pwd move context of terminal to Desktop: Code: cd Desktop install an appstarter directory on Desktop , with no extra (unit test etc) Code: bash-5.0$ composer create-project codeigniter4/appstarter --no-dev (i can just use "composer" because i set up so that composer evokes composer.phar you can do that and make it global using terminal : say composer.phar is on your Desktop use as root command below or add "sudo" Code: mv composer.phar /usr/local/bin/composer refer to : https://getcomposer.org/ basically it will be something like : Code: php composer.phar <command> when composer has successfully downloaded; you will have following directory structure: Code: appstarter lets fire it up confirm where terminal is: Code: bash-5.0$ pwd Couple of things @Crevitz if you follow above using spark server, you will find Welocome to Codeigniter page at : http://localhost:8080 if you have codeigniter in Apache xampp you need to point "listening" so that it uses public folder. Codeigniter already has a .htaccess in public . The only time i needed to touch it was when going from http to https on live server. The difference between using --no-dev is that if you don't use it you get a load of extra stuff. if you do not use it and find actually you don't need it you can always get rid of it using : Code: composer update --no-dev the url to see the home page is just : http://localhost:8080 no need for http://localhost:8080/project check directory structure The other thing i was going to mention is this: You might say fine , having that on my Desktop but i can not really do any development can i, since i will be using a database. So i will have to move it to Apache or Xampp. Not quite true . MySql Maria etc need a database daemon/server what ever you want to call it , but sqlite3 does not. sqlite3 is serverless and is just a file. I put mine in the writable directory. If you get sqlitebrowser you can view fields data in a basic gui and even create a databse, table. sqlite3 has a capacity of 281 terabytes so it should be more than enough . But MySQl is secure and sqlite3 doesn't use passwords ! well take it from me Wordpress uses MySQL and stores admin user name and passwords in a table called users. A lot of Wordpress sites are vulnerable nether-the-less. |
Messages In This Thread |
404 - File Not Found Codeigniter 4 - by Crevitz - 10-19-2020, 03:37 AM
RE: 404 - File Not Found Codeigniter 4 - by captain-sensible - 10-20-2020, 04:58 AM
|