diff options
author | Josh Hoyt <josh@janrain.com> | 2006-02-09 00:51:26 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-02-09 00:51:26 +0000 |
commit | 997b999147ece7b8c9e2cf3c5cb040196d3564f1 (patch) | |
tree | 8cd161a306ad925a5b0ccac85fb1e34194748fc8 /examples/server/server.php | |
parent | faff237123cfb9daffc07448d1f4fa54061e938f (diff) | |
download | php-openid-997b999147ece7b8c9e2cf3c5cb040196d3564f1.zip php-openid-997b999147ece7b8c9e2cf3c5cb040196d3564f1.tar.gz php-openid-997b999147ece7b8c9e2cf3c5cb040196d3564f1.tar.bz2 |
[project @ Make the entry point script tell the user when he needs to configure the server]
Diffstat (limited to 'examples/server/server.php')
-rw-r--r-- | examples/server/server.php | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/examples/server/server.php b/examples/server/server.php index b7d4219..95f2ba6 100644 --- a/examples/server/server.php +++ b/examples/server/server.php @@ -1,18 +1,36 @@ <?php require_once 'config.php'; -require_once 'lib/session.php'; -require_once 'lib/actions.php'; -init(); +if ($server_url) { + require_once 'lib/session.php'; + require_once 'lib/actions.php'; -$action = getAction(); -if (!function_exists($action)) { - $action = 'action_default'; -} + init(); -$resp = $action(); + $action = getAction(); + if (!function_exists($action)) { + $action = 'action_default'; + } -writeResponse($resp); + $resp = $action(); + writeResponse($resp); +} else { +?> +<html> + <head> + <title>PHP OpenID Server</title> + <body> + <h1>PHP OpenID Server</h1> + <p> + This server needs to be configured before it can be used. Edit + <code>config.php</code> to reflect your server's setup, then + load this page again. + </p> + </body> + </head> +</html> +<?php +} ?>
\ No newline at end of file |