Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 41137b4

Browse files
create index and config file.
1 parent ae90902 commit 41137b4

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

‎config.php‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/**
4+
* Config File For Handel Route, Database And Request
5+
*
6+
* Author: Mohammad Rahmani
7+
* Email: rto1680@gmail.com
8+
* WebPage: mohammadrahmani.com
9+
*
10+
*/
11+
12+
// Http Url
13+
$scriptName = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
14+
define('HTTP_URL', '/'. substr_replace(trim($_SERVER['REQUEST_URI'], '/'), '', 0, strlen($scriptName)));
15+
16+
// Define Path Application
17+
define('SCRIPT', str_replace('\\', '/', rtrim(__DIR__, '/')) . '/');
18+
define('SYSTEM', SCRIPT . 'System/');
19+
define('CONTROLLERS', SCRIPT . 'Application/Controllers/');
20+
define('MODELS', SCRIPT . 'Application/Models/');
21+
22+
// Config Database
23+
define('DATABASE', [
24+
'Port' => '3307',
25+
'Host' => 'localhost',
26+
'Driver' => 'PDO',
27+
'Name' => 'simple-mvc',
28+
'User' => 'root',
29+
'Pass' => '',
30+
'Prefix' => 'sm_'
31+
]);
32+
33+
// DB_PREFIX
34+
define('DB_PREFIX', 'sm_');

‎index.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /