Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:ci4 [2022/05/17 08:02] – darron | tools:ci4 [2022/08/19 12:24] (current) – [Resources] darron | ||
---|---|---|---|
Line 19: | Line 19: | ||
< | < | ||
- | apt install apache2 php php-cli php-mbstring php-intl php-curl php-json php-mysqlnd | + | apt install apache2 php php-cli php-mbstring php-intl php-curl php-json php-mysqlnd |
</ | </ | ||
Line 30: | Line 30: | ||
Zend Engine v3.4.0, Copyright (c) Zend Technologies | Zend Engine v3.4.0, Copyright (c) Zend Technologies | ||
with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies | with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies | ||
+ | </ | ||
+ | |||
+ | ===Install MySQL=== | ||
+ | |||
+ | Install MariaDB fork of MySQL. | ||
+ | |||
+ | < | ||
+ | apt-get install default-mysql-server default-mysql-client | ||
+ | </ | ||
+ | |||
+ | MySQL version | ||
+ | |||
+ | < | ||
+ | mysql --version | ||
+ | mysql Ver 15.1 Distrib 10.5.15-MariaDB, | ||
</ | </ | ||
Line 39: | Line 54: | ||
mkdir -p / | mkdir -p / | ||
cd / | cd / | ||
- | wget https:// | + | wget https:// |
- | unzip ci4.zip | + | unzip ci4.2.4.zip |
- | mv codeigniter4-CodeIgniter4-202f41a | + | mv codeigniter4-CodeIgniter4-* hostname.kewl.org |
cd hostname.kewl.org | cd hostname.kewl.org | ||
chown www-data: | chown www-data: | ||
</ | </ | ||
+ | Warning: 4.1 would auto-detect routes but this is not the case with 4.2. | ||
===Configure apache=== | ===Configure apache=== | ||
Line 87: | Line 103: | ||
=== Hello world==== | === Hello world==== | ||
- | ==Create controller== | + | ==Controller== |
< | < | ||
Line 108: | Line 124: | ||
</ | </ | ||
- | ==Create | + | ==Index view== |
< | < | ||
- | vi app/Views/Hello.php | + | vi app/Views/Index.php |
</ | </ | ||
Line 118: | Line 134: | ||
<html lang=" | <html lang=" | ||
< | < | ||
- | < | + | < |
</ | </ | ||
< | < | ||
- | <p>Hello World</p> | + | <!--Content start--> |
+ | <? | ||
+ | < | ||
</ | </ | ||
Line 128: | Line 146: | ||
</ | </ | ||
- | ==Visit URL== | + | ==Controller view== |
+ | |||
+ | < | ||
+ | vi app/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <?php | ||
+ | $this-> | ||
+ | $this-> | ||
+ | phpinfo(); | ||
+ | $this-> | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ==Route== | ||
+ | |||
+ | vi app/ | ||
+ | < | ||
+ | $routes-> | ||
+ | </ | ||
+ | |||
+ | ==URL== | ||
< | < | ||
Line 134: | Line 174: | ||
</ | </ | ||
+ | ===Resources=== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// |