-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Zoltan Vlasits edited this page Oct 17, 2025
·
1 revision
Welcome to the official documentation for the PHP MVC Framework with DataTables Server-Side Processing!
- Clone the repository:
git clone https://github.com/elightsys/PHP-MVC-03.git - Import the database schema:
mysql -u your_username -p your_database_name < mysql.sql - Copy and edit your configuration:
cp app/config/config.php.example app/config/config.php
- Edit
app/config/config.phpwith your database credentials. - Set a unique security key:
define('__UNIQID__', md5(uniqid(rand(), true))); - Never commit real credentials to GitHub!
- URLs map to controllers and methods:
/Pages/UsersβPagescontroller,Usersmethod - Example controller:
class Pages extends Controller { public function Users() { $this->view('pages/users', $data); } }
- All models use PDO for secure database access.
- Example query:
$this->db->query('SELECT * FROM users WHERE active = :active'); $this->db->bind(':active', 1); $results = $this->db->resultSet();
- Views are stored in
app/views/ - Pass data to views using
$this->view('viewname', $data);
- Server-side processing is built-in.
- AJAX endpoint:
/Pages/SspUsersDT - See the README for full DataTables setup.
- Use HTTPS in production.
- All queries use prepared statements.
- CSRF tokens are included in forms.
-
How do I add a new page?
Create a new controller and view, then map the route. -
How do I report a bug?
Use the "Issues" tab and fill out the bug report template.
For more details, see the README or open an issue!