FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PHP-MVC-REST-API/config.php at master · afgprogrammer/PHP-MVC-REST-API · GitHub
afgprogrammer
/
PHP-MVC-REST-API
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
41
Star
150
Code
Issues
2
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PHP-MVC-REST-API
/
config.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (30 loc) · 900 Bytes
Breadcrumbs
PHP-MVC-REST-API
/
config.php
Copy path
File metadata and controls
35 lines (30 loc) · 900 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Config File For Handel Route, Database And Request
*
* Author: Mohammad Rahmani
* Email: rto1680@gmail.com
* WebPage: afgprogrammer.com
*
*/
// Http Url
$
scriptName
=
str_replace
(
'\\'
,
'
/
'
,
dirname
(
$
_SERVER
[
'
SCRIPT_NAME
'
]));
define
(
'
HTTP_URL
'
,
'
/
'
.
substr_replace
(
trim
(
$
_SERVER
[
'
REQUEST_URI
'
],
'
/
'
),
''
,
0
,
strlen
(
$
scriptName
)));
// Define Path Application
define
(
'
SCRIPT
'
,
str_replace
(
'\\'
,
'
/
'
,
rtrim
(
__DIR__
,
'
/
'
)) .
'
/
'
);
define
(
'
SYSTEM
'
,
SCRIPT
.
'
System/
'
);
define
(
'
CONTROLLERS
'
,
SCRIPT
.
'
Application/Controllers/
'
);
define
(
'
MODELS
'
,
SCRIPT
.
'
Application/Models/
'
);
define
(
'
UPLOAD
'
,
SCRIPT
.
'
Upload/
'
);
// Config Database
define
(
'
DATABASE
'
, [
'
Port
'
=>
'
3306
'
,
'
Host
'
=>
'
localhost
'
,
'
Driver
'
=>
'
PDO
'
,
'
Name
'
=>
'
simple-mvc
'
,
'
User
'
=>
'
root
'
,
'
Pass
'
=>
''
,
'
Prefix
'
=>
'
sm_
'
]);
// DB_PREFIX
define
(
'
DB_PREFIX
'
,
'
sm_
'
);
Back
|
FazBrowse Home
|
New Git URL