|
@@ -1,8 +1,8 @@
|
|
|
<?php
|
|
|
-include "./config.php";
|
|
|
-include "./ShortUrl.php";
|
|
|
-
|
|
|
-$code = $_GET["c"];
|
|
|
+include dirname(__FILE__)."/config.php";
|
|
|
+include dirname(__FILE__)."/ShortUrl.php";
|
|
|
+
|
|
|
+$code = str_replace("/","", $_SERVER['REQUEST_URI']);
|
|
|
|
|
|
try {
|
|
|
$pdo = new PDO(DB_PDODRIVER . ":host=" . DB_HOST .
|
|
@@ -22,7 +22,6 @@ try {
|
|
|
}
|
|
|
catch (Exception $e) {
|
|
|
// log exception and then redirect to error page.
|
|
|
-// header("Location: /error");
|
|
|
- header("Location: index.php");
|
|
|
- exit;
|
|
|
-}
|
|
|
+ //header("Location: index.php");
|
|
|
+ //exit;
|
|
|
+}
|