A lightweight PHP MVC framework tailored for university students to create graduation projects with ease and efficiency.
- AutoLoader: Simplifies class management by automatically loading required files.
- Log Class: Tracks programming errors and debugging information.
- Request Class: Processes HTTP requests and retrieves parameters.
- Response Class: Handles HTTP responses and headers.
- Router Class: Maps URLs to controllers and actions.
- View Class: Renders dynamic views with templating support.
- Session Class: Manages user sessions securely and efficiently.
- Hash Class: Provides utilities for creating and verifying hashes for security purposes.
- Validation Class: Facilitates data validation with customizable rules to ensure data integrity.
- Clone this repository:
git clone https://github.com/xDayeh/wise.git
- Navigate to the project directory and set up your server environment.
- Ensure that the following files have write permissions:
storage/log
storage/session
- Start building your application using the provided structure.
-
Download PHP:
- Download PHP version 8.3 VS16 X64 Thread Safe via the following link:
https://windows.php.net/download#php-8.3 - After downloading PHP, move it to the correct path, preferably
C:/php
.
- Download PHP version 8.3 VS16 X64 Thread Safe via the following link:
-
Download Apache:
- Download Apache 2.4.6 Win64 via the link:
https://www.apachelounge.com/download/ - After downloading Apache, move it to the correct path, preferably
C:/apache24
.
- Download Apache 2.4.6 Win64 via the link:
-
Prepare the Wise Project:
- Move the Wise project to the
htdocs
folder inside your Apache directory. - Open the Apache configuration file:
C:/Apache24/conf/httpd.conf
. - Modify the
DocumentRoot
and<Directory>
sections to point tohtdocs/wise/public
. For example:DocumentRoot "C:/Apache24/htdocs/wise/public" <Directory "C:/Apache24/htdocs/wise/public"> AllowOverride All Require all granted </Directory>
- Change
AllowOverride None
toAllowOverride All
in the<Directory>
section. - Change
DirectoryIndex index.html
toDirectoryIndex index.php
. - Update the
ServerName
directive Change from:#ServerName www.example.com:80
To:Ensure you remove theServerName localhost:80
#
from theServerName
line.
- Move the Wise project to the
-
Link PHP with Apache:
- Ensure Apache is not running and open its configuration file:
C:/Apache24/conf/httpd.conf
. - Add the following lines to the bottom of the file:
# PHP8 module PHPIniDir "C:/php" LoadModule php_module "C:/php/php8apache2_4.dll" AddType application/x-httpd-php .php
- Enable rewrite mode in
httpd.conf
by uncommenting the following line (remove the#
at the beginning):#LoadModule rewrite_module modules/mod_rewrite.so
- Save the file after making this change.
- Ensure Apache is not running and open its configuration file:
-
Run Apache:
- Open CMD and navigate to the Apache folder.
- Run the following commands:
C:/Apache24/bin/httpd.exe -k install C:/Apache24/bin/httpd.exe -k start
-
Enable the PDO MySQL & MySQLi Extension:
- Open your php.ini file. This file is usually located in the PHP installation directory, for example:
C:\php\php.ini
- Search for the following line:
;extension=pdo_mysql ;extension=mysqli
- Remove the semicolon (;) at the beginning of the line to uncomment it:
extension=pdo_mysql extension=mysqli
- Restart Apache
C:/Apache24/bin/httpd.exe -k restart
- Search for the following line:
- Open your php.ini file. This file is usually located in the PHP installation directory, for example:
-
Download MySQL
- Download MySQL Installer 8.0 via the link:
https://dev.mysql.com/downloads/installer/ - After downloading MySQL, Install MySQL Server & MySQL Workbench
- Download MySQL Installer 8.0 via the link:
- Explanation will be added soon.
Contributions are welcome! Feel free to fork this repository and submit pull requests.
Free to use without restrictions.