diff options
author | Josh Hoyt <josh@janrain.com> | 2006-02-02 01:50:58 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-02-02 01:50:58 +0000 |
commit | 3b85434814af589323763f8ca66738d2f3be6ffe (patch) | |
tree | fc5d7b167c07ea0d8cd2ea7944717e88a64df719 /examples/detect.php | |
parent | da61eb6e42c29318e273149233987d09bbbf0233 (diff) | |
download | php-openid-3b85434814af589323763f8ca66738d2f3be6ffe.zip php-openid-3b85434814af589323763f8ca66738d2f3be6ffe.tar.gz php-openid-3b85434814af589323763f8ca66738d2f3be6ffe.tar.bz2 |
[project @ Sniff whether we are running from the command line or via a web server]
Diffstat (limited to 'examples/detect.php')
-rw-r--r-- | examples/detect.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/detect.php b/examples/detect.php index a434b10..9c359ec 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -141,7 +141,11 @@ class HTML { } } -$r = new PlainText(); +if (isset($_SERVER['REQUEST_METHOD'])) { + $r = new HTML(); +} else { + $r = new PlainText(); +} function detect_math($r, &$out) { |