Menu

[r17]: / trunk / index.php  Maximize  Restore  History

Download this file

18 lines (16 with data), 637 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
require_once("config.php");
require_once("phpython.lib.php");
$url = parse_url($_SERVER["REQUEST_URI"]);
$url["script"] = $url["path"];
$url["script"] = dirname(__FILE__)."/www/".substr($url["script"],strlen(__BASEPATH__));
$url["script"] = substr($url["script"],-1)=="/" ? $url["script"]."index.py" : $url["script"];
$url["script"] = is_dir($url["script"]) ? $url["script"]."/index.py" : $url["script"];
if (file_exists($url["script"])) {
python_exec($url["script"]);
} else {
header('HTTP/1.0 404 Not Found');
echo "<h1>404 Not Found</h1>";
echo "The page that you have requested could not be found.";
exit();
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.