FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
framework/server.php at master · UserApplePie/framework · GitHub
UserApplePie
/
framework
Public
forked from
nova-framework/framework
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
framework
/
server.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (13 loc) · 533 Bytes
Breadcrumbs
framework
/
server.php
Copy path
File metadata and controls
19 lines (13 loc) · 533 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
<?php
// This file allows us to emulate Apache's "mod_rewrite" functionality from the built-in PHP web server.
// Provides a convenient way to test the application without having installed a "real" web server software.
// Usage:
// php -S localhost:8080 -t ../public/ server.php
$
public_path
=
'
public/
'
;
$
uri
=
parse_url
(
$
_SERVER
[
'
REQUEST_URI
'
],
PHP_URL_PATH
);
$
uri
=
urldecode
(
$
uri
);
$
requested
=
$
public_path
.
$
uri
;
if
((
$
uri
!==
'
/
'
) &&
file_exists
(
$
requested
)) {
return
false
;
}
require_once
$
public_path
.
'
index.php
'
;
Back
|
FazBrowse Home
|
New Git URL