From 24c854a81143d95ccb3575e9cc10863d9964a434 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Sat, 16 May 2015 00:20:16 +0200 Subject: [PATCH] updates documentation explains how to load Bibtex data from a dynamic string --- bibtexbrowser-documentation.wiki | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bibtexbrowser-documentation.wiki b/bibtexbrowser-documentation.wiki index 06d5a6b..e991cdc 100644 --- a/bibtexbrowser-documentation.wiki +++ b/bibtexbrowser-documentation.wiki @@ -338,8 +338,18 @@ Add in ''bibtexbrowser.local.php'' (see "creating a bibtexbrowser.local.php" bel define('BIBTEXBROWSER_ROBOTS_NOINDEX', true); +====How to load Bibtex from a dynamic string?==== +You can use the special ''php://memory'' feature as follows: +
+$test_data = fopen('php://memory','x+');
+fwrite($test_data, "@book{aKey,title={A Book},author={Jan Doe},publisher={Springer},year=2009}\n");
+fseek($test_data,0);
+$this->btb = new BibDataBase();
+$this->btb->update_internal("inline", $test_data);
+
+ =====Related tools===== Old-fashioned: