Browse Source
figured out how to ensure correct html wrapper used when script is required from outside its cwd
pull/81/head
figured out how to ensure correct html wrapper used when script is required from outside its cwd
pull/81/head

4 changed files with 41 additions and 26 deletions
@ -0,0 +1,25 @@ |
|||
<?PHP |
|||
|
|||
print <<<HTML |
|||
<!doctype html> |
|||
<html> |
|||
<head></head> |
|||
<body> |
|||
HTML; |
|||
|
|||
$_GET['library']=1; |
|||
require_once('../src/bibtexbrowser.php'); |
|||
$db = new BibDataBase(); |
|||
$db->load('bibacid-utf8.bib'); |
|||
$query = array('year'=>'1997'); |
|||
$entries=$db->multisearch($query); |
|||
uasort($entries, 'compare_bib_entries'); |
|||
foreach ($entries as $bibentry) { |
|||
print $bibentry->toHTML()."<br/>"; |
|||
} |
|||
|
|||
print <<<HTML |
|||
</body> |
|||
</html> |
|||
HTML; |
|||
exit; |
@ -1,27 +1,16 @@ |
|||
<?PHP |
|||
|
|||
|
|||
// have this assume same directory as thing
|
|||
$_GET['bib'] = "bibacid-utf8.bib"; |
|||
|
|||
// first step is to get relative reference correct
|
|||
|
|||
require_once "../src/bibtexbrowser.php"; |
|||
|
|||
|
|||
//require_once "../vendor/autoload.php";
|
|||
|
|||
// use Monperrus\BibtexBrowser\Bibliography;
|
|||
|
|||
require_once "../vendor/autoload.php"; |
|||
|
|||
use Monperrus\BibtexBrowser\Bibliography; |
|||
|
|||
// $config = array("bib" => "bibacid-utf8.bib",
|
|||
// "all" => 1,
|
|||
// "author" => "",
|
|||
// "academic" => 1
|
|||
// );
|
|||
$config = array("bib" => "bibacid-utf8.bib", |
|||
"all" => 1, |
|||
"author" => "", |
|||
"academic" => 1 |
|||
); |
|||
|
|||
// $_GET['menu']=1;
|
|||
// $browser = new Monperrus\BibtexBrowser\Bibliography($config);
|
|||
// $browser->print();
|
|||
//s($_SERVER);
|
|||
$browser = new Bibliography($config); |
|||
$browser->print(); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue