Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

Commit

Permalink
Running webmum with php built-in server
Browse files Browse the repository at this point in the history
  • Loading branch information
ohartl committed Sep 8, 2016
1 parent a7c3a4f commit 3594c6e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3594c6e

Please sign in to comment.