PHP web framework
- simple and straight in development and maintenance
- MVC-like code, data, templates are split
- code consists of: controllers, models, framework core and optional 3rd party libs
- uses ParsePage template engine
- data stored by default in MySQL database using db.php
- RESTful with some practical enhancements
GET /Controller
- list viewGET /Controller/ID
- one record viewGET /Controller/ID/new
- one record new formGET /Controller/ID/edit
- one record edit formGET /Controller/ID/delete
- one record delete confirmation formPOST /Controller
- insert new recordPUT /Controller
- update multiple recordsPOST/PUT /Controller/ID
- update recordPOST/DELETE /Controller/ID
- delete record ($_POST should be empty)GET/POST /Controller/(Action)[/ID]
- call for arbitrary action from the controller
- integrated auth - simple flat access levels auth
- use of well-known 3rd party libraries
- jQuery
- Twitter Bootstrap 4
- jQuery Form
- jGrowl
- markdown libs
- others... (TODO)
- membership access
- simple Pages CMS (ability to edit pages, upload images/files)
- uploads manager
- members manager
- contact us form
TODO
- put contents of
/www
into your webserver's public html folder - edit
/www/php/config.site.php
(orconfig.develop.php
) - create database from
/db/database.sql
- open site in your browser and login with credentials as defined in database.sql
Automated install via Composer - TBD
Debugging is much easier with these 3 globally available functions:
-
rw($var)
this function will work like var_dump and just dump variable structure and data to browser (with some formatting) -
rwe($var)
same as above, but immediately die to stop script -
logger($var)
this will dump variable to a log file, defined in configsite_error_log
param. Error log created automatically with first call to logger().
Check your error.log file. It should be one level up from /www by default.
Better to use logger()
than rw()
as it writes everything to file, not to browser/screen, keeping UI
$SITE_CONFIG
(defined in config files) contains LOG_LEVEL
parameter. If it's false
- logger()
will not write anything. Usually you want to set LOG_LEVEL
to false
or INFO|WARN|ERROR|FATAL
on production site and ALL|TRACE|DEBUG
for development/test.