Recommend this page to a friend! |
Download .zip |
Info | Example | View files (27) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-10-01 (3 months ago) | Not enough user ratings | Total: 51 | All time: 10,575 This week: 118 |
Version | License | PHP version | Categories | |||
kuarasy 1.0 | The PHP License | 5 | PHP 5, Databases, Libraries, Design P... |
Description | Author | ||||||||||||||
This package implements a framework to develop PHP applications using MySQL. |
|
<?php
|
Just a simple PHP - MySQL framework
This is a very simple and basic PHP - MySQL framework. Help us improve it. Use as you wish.
1 - Update the database connection details in <code>/config.php</code>:
define('K_DB_NAME', '');
define('K_DB_USER', '');
define('K_DB_PASSWORD', '');
2 - If you are NOT running directly on server root, set the BASEPATH reference in <code>/config.php</code>:
define('BASEPATH', '/kuarasy'); // assuming you are running from https://localhost/kuarasy
and <code>/.htaccess</code>:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
# Force Trailing slash
RewriteRule ^((.*)[^/])$ /kuarasy/$1/ [L,R=301] # HERE
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /kuarasy/index.php [L] # AND HERE
As default, DEFAULT_VIEW is defined in <code>config.php</code>. It holds the directory name of your main frontpage. Load other views and web apps using the basic function load('view_name') from <code>/views/Base.php</code>
The basic REST API in this framework uses a action request field to define the task / route This action will call a method with same name from <code>/views/Base.php</code> or any of it's properties
After installation test it: http://localhost/kuarasy?action=status
Each task uses a task field for identification. Try this on console:
php index.php task=say_hello
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
controllers (6 files) | ||||
log (1 file) | ||||
models (3 files) | ||||
templates (2 files) | ||||
uploads (1 file) | ||||
views (3 files, 1 directory) | ||||
_assets (1 file, 1 directory) | ||||
.htaccess | Data | Auxiliary data | ||
config.php | Aux. | Auxiliary script | ||
Helper.php | Class | Class source | ||
index.php | Example | Example script | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files | / | controllers |
Files | / | models |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
Base.php | Class | Class source |
Example.php | Class | Class source |
Files | / | templates |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
cool_email.php | Aux. | Auxiliary script |
Files | / | views |
File | Role | Description | ||
---|---|---|---|---|
example (2 files) | ||||
.htaccess | Data | Auxiliary data | ||
Base.php | Class | Class source | ||
Console.php | Class | Class source |
Files | / | views | / | example |
File | Role | Description |
---|---|---|
index.php | Aux. | Auxiliary script |
subview.php | Aux. | Auxiliary script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.