From 39ad0dfc8ce79a3e3b013cef67568edd01fe48d2 Mon Sep 17 00:00:00 2001 From: M Date: Sat, 21 Nov 2015 13:31:48 -0500 Subject: + Adding main source file which invokes the master controller --- app/index.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/index.php (limited to 'app/index.php') diff --git a/app/index.php b/app/index.php new file mode 100644 index 0000000..ca2ce45 --- /dev/null +++ b/app/index.php @@ -0,0 +1,16 @@ +"; +} + +main(explode("/", $_SERVER['PATH_INFO'])); // Start rendering web page for the requested path. + +?> -- cgit v1.2.3 From 2f353e89409420b875afefd7b412c17996c32045 Mon Sep 17 00:00:00 2001 From: M Date: Sat, 21 Nov 2015 16:33:28 -0500 Subject: * Changing the mechanism by which the requested path is passed to the app ! It has been observed that on server nginx, some of the assumptions from doing similar work on apache have broken down and a more general mechanism must be used to handle paths in the clean-url app. ! New scheme is this: app is invoked with `index.php?path=` The app will be configured with its own root location on the virt. server and use logic to dedue the relative path requested from that. Also app will use the configured path to predend to urls linked/directed to during use of the app --- app/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/index.php') diff --git a/app/index.php b/app/index.php index ca2ce45..5f2d9f4 100644 --- a/app/index.php +++ b/app/index.php @@ -11,6 +11,6 @@ function main($argv) echo "Scrott!
"; } -main(explode("/", $_SERVER['PATH_INFO'])); // Start rendering web page for the requested path. +main(explode("/", $_REQUEST['path'])); // Start rendering web page for the requested path. ?> -- cgit v1.2.3 From dbba1012ca163a9e9117ff3f6c2a7ca984b4dc4c Mon Sep 17 00:00:00 2001 From: M Date: Sat, 21 Nov 2015 16:51:52 -0500 Subject: * Now using require in favor of include throughout PHP in the app --- app/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/index.php') diff --git a/app/index.php b/app/index.php index 5f2d9f4..854df0b 100644 --- a/app/index.php +++ b/app/index.php @@ -1,6 +1,6 @@ Date: Sat, 21 Nov 2015 19:59:25 -0500 Subject: + Added app root controller * Finished implementing app main function to instanciate root and delegate to it --- app/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/index.php') diff --git a/app/index.php b/app/index.php index 854df0b..37258d7 100644 --- a/app/index.php +++ b/app/index.php @@ -7,8 +7,8 @@ require_once "controller/root.control.php"; */ function main($argv) { - /* TODO */ - echo "Scrott!
"; + $app = new Root(); + $app->handle($argv); } main(explode("/", $_REQUEST['path'])); // Start rendering web page for the requested path. -- cgit v1.2.3