projects
/
banana.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add basic support for a json output.
[banana.git]
/
examples
/
index.php
diff --git
a/examples/index.php
b/examples/index.php
index
4419ee3
..
50e7d5a
100644
(file)
--- a/
examples/index.php
+++ b/
examples/index.php
@@
-126,6
+126,11
@@
$feed = $banana->feed(); // Get a link to banana's feed. You need to use Ba
$bt = $banana->backtrace(); // Get protocole execution backtrace
session_write_close();
+if (@strtolower($_GET['output']) === 'json') {
+ header('Content-Type: text/javascript');
+ echo $res;
+ exit;
+}
// Genererate the page
?>