summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-02-02 01:50:58 +0000
committerJosh Hoyt <josh@janrain.com>2006-02-02 01:50:58 +0000
commit3b85434814af589323763f8ca66738d2f3be6ffe (patch)
treefc5d7b167c07ea0d8cd2ea7944717e88a64df719 /examples/detect.php
parentda61eb6e42c29318e273149233987d09bbbf0233 (diff)
downloadphp-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.php6
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)
{