# EasyPHP **Repository Path**: helloqingbing/EasyPHP ## Basic Information - **Project Name**: EasyPHP - **Description**: 基于MINIPHP 自研的EasyPHP - **Primary Language**: PHP - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-11-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # EasyPHP EasyPHP is a extremely sample and easy to understand skeleton php web framework application, it contains the basic configuration and route. EasyPHP is the same as [MINI3](https://github.com/panique/mini3) ## Features - extremely simple, easy to understand - simple but clean structure - makes "beautiful" clean URLs - demo CRUD actions: Create, Read, Update and Delete database entries easily - demo AJAX call - tries to follow PSR coding guidelines - uses PDO for any database requests, comes with an additional PDO debug tool to emulate your SQL statements - commented code ## Requirements - PHP 5.6 or PHP 7.0 - MySQL - mod_rewrite activated (see below for tutorials) - basic knowledge of Composer for sure ## Installation git clone [url] [appName] ## How to include stuff / use PSR-4 As this project uses proper PSR-4 namespaces, make sure you load/use your stuff correctly: Instead of including classes with old-school code like `include xxx.php`, simply do something like `use Mini\Model\DataModal;` on top of your file (modern IDEs even do that automatically). This would automatically include the file *DataModal.php* from the folder *Mini/Model* (it's case-sensitive!). But wait, there's no `Mini/Model/DataModal.php` in the project, but a `application/Model/DataModal.php`, right ? To keep things cleaner, the composer.json sets a *namespace* (see code below), which is basically a name or an alias, for a certain folder / area of your application, in this case the folder `application` is now reachable via `Mini` when including stuff. ``` { "psr-4": { "Mini\\" : "application/" } } ``` This might look stupid at first, but comes in handy later. To sum it up: To load the file `application/Model/Song.php`, write a `use Mini\Model\Song;` on top of your controller file. Have a look into the SongController to get an idea how everything works! FYI: As decribed in the install tutorial, you'll need do perform a "composer install" when setting up your application for the first time, which will create a set of files (= the autoloader) inside /vendor folder. This is the normal way Composer handle this stuff. If you delete your vendor folder the autoloading will not work anymore. If you change something in the composer.json, always make sure to run composer install/update again! ## License This project is licensed under the MIT License. This means you can use and modify it for free in private or commercial projects.