Running webmum with php built-in server
This commit is contained in:
parent
a7c3a4f271
commit
3594c6e236
1 changed files with 10 additions and 0 deletions
10
index.php
10
index.php
|
@ -1,5 +1,15 @@
|
|||
<?php
|
||||
|
||||
if (php_sapi_name() == "cli-server") {
|
||||
// running under built-in server
|
||||
$extensions = array("php", "jpg", "jpeg", "css", "js");
|
||||
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
|
||||
$ext = pathinfo($path, PATHINFO_EXTENSION);
|
||||
if (in_array($ext, $extensions)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
/**
|
||||
* Loading system
|
||||
|
|
Loading…
Add table
Reference in a new issue